Package | Description |
---|---|
org.apache.lucene.analysis.query |
Automatically filter high-frequency stopwords.
|
org.apache.lucene.facet |
Faceted search.
|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.misc |
Miscellaneous index tools.
|
org.apache.lucene.queries |
Filters and Queries that add to core Lucene.
|
org.apache.lucene.queries.function |
Queries that compute score based upon a function.
|
org.apache.lucene.queryparser.classic |
A simple query parser implemented with JavaCC.
|
org.apache.lucene.queryparser.complexPhrase |
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
|
org.apache.lucene.queryparser.surround.query |
This package contains SrndQuery and its subclasses.
|
org.apache.lucene.sandbox.queries |
Additional queries (some may have caveats or limitations)
|
org.apache.lucene.sandbox.queries.regex |
Regular expression Query.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.payloads |
The payloads package provides Query mechanisms for finding and using payloads.
|
org.apache.lucene.search.spans |
The calculus of spans.
|
org.apache.lucene.search.spell |
Suggest alternate spellings for words.
|
org.apache.lucene.search.suggest.document |
Support for document suggestion
|
org.apache.lucene.util |
Some utility classes.
|
Modifier and Type | Method and Description |
---|---|
Term[] |
QueryAutoStopWordAnalyzer.getStopWords()
Provides information on which stop words have been identified for all fields
|
Modifier and Type | Method and Description |
---|---|
static Term |
DrillDownQuery.term(String field,
String dim,
String... path)
Creates a drill-down term.
|
Modifier and Type | Method and Description |
---|---|
void |
PrefixCodedTerms.Builder.add(Term term)
add a term
|
protected void |
ThreadedIndexingAndSearchingTestCase.addDocument(Term id,
Iterable<? extends IndexableField> doc) |
protected void |
ThreadedIndexingAndSearchingTestCase.addDocuments(Term id,
List<? extends Iterable<? extends IndexableField>> docs) |
static TermContext |
TermContext.build(IndexReaderContext context,
Term term)
|
int |
Term.compareTo(Term other)
Compares two terms, returning a negative integer if this
term belongs before the argument, zero if this term is equal to the
argument, and a positive integer if this term belongs after the argument.
|
long |
TrackingIndexWriter.deleteDocuments(Term... terms)
Calls
IndexWriter.deleteDocuments(Term...) and
returns the generation that reflects this change. |
void |
IndexWriter.deleteDocuments(Term... terms)
Deletes the document(s) containing any of the
terms.
|
protected void |
ThreadedIndexingAndSearchingTestCase.deleteDocuments(Term term) |
void |
RandomIndexWriter.deleteDocuments(Term term) |
long |
TrackingIndexWriter.deleteDocuments(Term t)
Calls
IndexWriter.deleteDocuments(Term...) and
returns the generation that reflects this change. |
abstract int |
IndexReader.docFreq(Term term)
Returns the number of documents containing the
term . |
int |
LeafReader.docFreq(Term term) |
int |
BaseCompositeReader.docFreq(Term term) |
PostingsEnum |
LeafReader.postings(Term term)
Returns
PostingsEnum for the specified term
with PostingsEnum.FREQS . |
PostingsEnum |
LeafReader.postings(Term term,
int flags)
Returns
PostingsEnum for the specified term. |
DocsEnum |
LeafReader.termDocsEnum(Term term)
Deprecated.
use
LeafReader.postings(Term) instead |
DocsAndPositionsEnum |
LeafReader.termPositionsEnum(Term term)
Deprecated.
use
LeafReader.postings(Term, int) instead |
abstract long |
IndexReader.totalTermFreq(Term term)
Returns the total number of occurrences of
term across all
documents (the sum of the freq() for each doc that has this term). |
long |
LeafReader.totalTermFreq(Term term)
Returns the number of documents containing the term
t . |
long |
BaseCompositeReader.totalTermFreq(Term term) |
void |
RandomIndexWriter.updateBinaryDocValue(Term term,
String field,
BytesRef value) |
void |
IndexWriter.updateBinaryDocValue(Term term,
String field,
BytesRef value)
|
protected void |
ThreadedIndexingAndSearchingTestCase.updateDocument(Term term,
Iterable<? extends IndexableField> doc) |
long |
TrackingIndexWriter.updateDocument(Term t,
Iterable<? extends IndexableField> d)
Calls
IndexWriter.updateDocument(Term,Iterable) and
returns the generation that reflects this change. |
void |
IndexWriter.updateDocument(Term term,
Iterable<? extends IndexableField> doc)
Updates a document by first deleting the document(s)
containing
term and then adding the new
document. |
<T extends IndexableField> |
RandomIndexWriter.updateDocument(Term t,
Iterable<T> doc)
Updates a document.
|
void |
RandomIndexWriter.updateDocuments(Term delTerm,
Iterable<? extends Iterable<? extends IndexableField>> docs) |
long |
TrackingIndexWriter.updateDocuments(Term t,
Iterable<? extends Iterable<? extends IndexableField>> docs)
Calls
IndexWriter.updateDocuments(Term,Iterable) and returns
the generation that reflects this change. |
void |
IndexWriter.updateDocuments(Term delTerm,
Iterable<? extends Iterable<? extends IndexableField>> docs)
Atomically deletes documents matching the provided
delTerm and adds a block of documents with sequentially
assigned document IDs, such that an external reader
will see all or none of the documents.
|
protected void |
ThreadedIndexingAndSearchingTestCase.updateDocuments(Term id,
List<? extends Iterable<? extends IndexableField>> docs) |
void |
RandomIndexWriter.updateDocValues(Term term,
Field... updates) |
void |
IndexWriter.updateDocValues(Term term,
Field... updates)
Updates documents' DocValues fields to the given values.
|
void |
IndexWriter.updateNumericDocValue(Term term,
String field,
long value)
|
void |
RandomIndexWriter.updateNumericDocValue(Term term,
String field,
Long value) |
Constructor and Description |
---|
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Term midTerm)
Split an index based on a given primary key term
and a 'middle' term.
|
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Term midTerm,
IndexWriterConfig config1,
IndexWriterConfig config2) |
Modifier and Type | Method and Description |
---|---|
static void |
GetTermInfo.getTermInfo(Directory dir,
Term term) |
Modifier and Type | Field and Description |
---|---|
protected List<Term> |
CommonTermsQuery.terms |
Modifier and Type | Method and Description |
---|---|
void |
CommonTermsQuery.add(Term term)
Adds a term to the
CommonTermsQuery |
protected Query |
CommonTermsQuery.buildQuery(int maxDoc,
TermContext[] contextArray,
Term[] queryTerms) |
void |
CommonTermsQuery.collectTermContext(IndexReader reader,
List<LeafReaderContext> leaves,
TermContext[] contextArray,
Term[] queryTerms) |
protected Query |
CommonTermsQuery.newTermQuery(Term term,
TermContext context)
Builds a new TermQuery instance.
|
Constructor and Description |
---|
TermFilter(Term term)
Deprecated.
Create a new TermFilter
|
TermsFilter(Term... terms)
Deprecated.
Creates a new
TermsFilter from the given array. |
TermsQuery(Term... terms)
Creates a new
TermsQuery from the given array. |
Constructor and Description |
---|
TermsFilter(List<Term> terms)
Deprecated.
Creates a new
TermsFilter from the given list. |
TermsQuery(List<Term> terms)
Creates a new
TermsQuery from the given list. |
Modifier and Type | Method and Description |
---|---|
void |
FunctionQuery.FunctionWeight.extractTerms(Set<Term> terms) |
Modifier and Type | Method and Description |
---|---|
protected Query |
QueryParserBase.newFuzzyQuery(Term term,
float minimumSimilarity,
int prefixLength)
Builds a new FuzzyQuery instance
|
protected Query |
QueryParserBase.newPrefixQuery(Term prefix)
Builds a new PrefixQuery instance
|
protected Query |
QueryParserBase.newRegexpQuery(Term regexp)
Builds a new RegexpQuery instance
|
protected Query |
QueryParserBase.newWildcardQuery(Term t)
Builds a new WildcardQuery instance
|
Modifier and Type | Method and Description |
---|---|
protected Query |
ComplexPhraseQueryParser.newTermQuery(Term term) |
Modifier and Type | Method and Description |
---|---|
Term |
SrndPrefixQuery.getLucenePrefixTerm(String fieldName) |
Term |
SrndTermQuery.getLuceneTerm(String fieldName) |
Modifier and Type | Method and Description |
---|---|
void |
SpanNearClauseFactory.addTermWeighted(Term t,
float weight) |
SpanTermQuery |
BasicQueryFactory.newSpanTermQuery(Term term) |
TermQuery |
BasicQueryFactory.newTermQuery(Term term) |
void |
SimpleTerm.MatchingTermVisitor.visitMatchingTerm(Term t) |
Modifier and Type | Field and Description |
---|---|
protected Term |
SlowFuzzyQuery.term
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Term |
SlowFuzzyQuery.getTerm()
Deprecated.
Returns the pattern term.
|
Constructor and Description |
---|
SlowFuzzyQuery(Term term)
Deprecated.
|
SlowFuzzyQuery(Term term,
float minimumSimilarity)
Deprecated.
|
SlowFuzzyQuery(Term term,
float minimumSimilarity,
int prefixLength)
Deprecated.
|
SlowFuzzyQuery(Term term,
float minimumSimilarity,
int prefixLength,
int maxExpansions)
Deprecated.
Create a new SlowFuzzyQuery that will match terms with a similarity
of at least
minimumSimilarity to term . |
SlowFuzzyTermsEnum(Terms terms,
AttributeSource atts,
Term term,
float minSimilarity,
int prefixLength)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Term |
RegexQuery.getTerm() |
Constructor and Description |
---|
RegexQuery(Term term)
Constructs a query for terms matching
term . |
RegexTermsEnum(TermsEnum tenum,
Term term,
RegexCapabilities regexCap) |
Modifier and Type | Field and Description |
---|---|
protected Term |
AutomatonQuery.term
term containing the field, and possibly some pattern structure
|
Modifier and Type | Method and Description |
---|---|
Term |
PrefixQuery.getPrefix()
Returns the prefix of this query.
|
Term |
PrefixFilter.getPrefix()
Deprecated.
|
Term |
TermQuery.getTerm()
Returns the term of this query.
|
Term |
FuzzyQuery.getTerm()
Returns the pattern term.
|
Term |
WildcardQuery.getTerm()
Returns the pattern term.
|
Term[] |
PhraseQuery.getTerms()
Returns the list of terms in this phrase.
|
Term[] |
NGramPhraseQuery.getTerms()
Return the list of terms.
|
protected Term |
SearchEquivalenceTestBase.randomTerm()
returns a term suitable for searching.
|
static Term[] |
BaseExplanationTestCase.ta(String[] s)
helper for generating MultiPhraseQueries
|
Modifier and Type | Method and Description |
---|---|
void |
PhraseQuery.add(Term term)
Deprecated.
Phrase queries should be created once with
PhraseQuery.Builder
and then considered immutable. See PhraseQuery.Builder.add(Term) . |
PhraseQuery.Builder |
PhraseQuery.Builder.add(Term term)
Adds a term to the end of the query phrase.
|
void |
MultiPhraseQuery.add(Term term)
Add a single term at the next position in the phrase.
|
BlendedTermQuery.Builder |
BlendedTermQuery.Builder.add(Term term)
Add a new
Term to this builder, with a default boost of 1 . |
void |
MultiPhraseQuery.add(Term[] terms)
Add multiple terms at the next position in the phrase.
|
void |
MultiPhraseQuery.add(Term[] terms,
int position)
Allows to specify the relative position of terms within the phrase.
|
BlendedTermQuery.Builder |
BlendedTermQuery.Builder.add(Term term,
float boost)
Add a
Term with the provided boost. |
BlendedTermQuery.Builder |
BlendedTermQuery.Builder.add(Term term,
float boost,
TermContext context)
Expert: Add a
Term with the provided boost and context. |
void |
PhraseQuery.add(Term term,
int position)
Deprecated.
Phrase queries should be created once with
PhraseQuery.Builder
and then considered immutable. See PhraseQuery.Builder.add(Term, int) . |
PhraseQuery.Builder |
PhraseQuery.Builder.add(Term term,
int position)
Adds a term to the end of the query phrase.
|
protected void |
MultiTermQuery.TopTermsBlendedFreqScoringRewrite.addClause(BlendedTermQuery.Builder topLevel,
Term term,
int docCount,
float boost,
TermContext states) |
protected void |
MultiTermQuery.TopTermsScoringBooleanQueryRewrite.addClause(BooleanQuery.Builder topLevel,
Term term,
int docCount,
float boost,
TermContext states) |
protected void |
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.addClause(BooleanQuery.Builder topLevel,
Term term,
int docFreq,
float boost,
TermContext states) |
TermStatistics |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.termStatistics(Term term,
TermContext context) |
TermStatistics |
IndexSearcher.termStatistics(Term term,
TermContext context)
Returns
TermStatistics for a term. |
static Automaton |
WildcardQuery.toAutomaton(Term wildcardquery)
Convert Lucene wildcard syntax into an automaton.
|
Modifier and Type | Method and Description |
---|---|
void |
DisjunctionMaxQuery.DisjunctionMaxWeight.extractTerms(Set<Term> terms) |
abstract void |
Weight.extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
void |
ConstantScoreWeight.extractTerms(Set<Term> terms) |
Constructor and Description |
---|
AutomatonQuery(Term term,
Automaton automaton)
Create a new AutomatonQuery from an
Automaton . |
AutomatonQuery(Term term,
Automaton automaton,
int maxDeterminizedStates)
Create a new AutomatonQuery from an
Automaton . |
AutomatonQuery(Term term,
Automaton automaton,
int maxDeterminizedStates,
boolean isBinary)
Create a new AutomatonQuery from an
Automaton . |
FuzzyQuery(Term term)
|
FuzzyQuery(Term term,
int maxEdits)
|
FuzzyQuery(Term term,
int maxEdits,
int prefixLength)
|
FuzzyQuery(Term term,
int maxEdits,
int prefixLength,
int maxExpansions,
boolean transpositions)
Create a new FuzzyQuery that will match terms with an edit distance
of at most
maxEdits to term . |
FuzzyTermsEnum(Terms terms,
AttributeSource atts,
Term term,
float minSimilarity,
int prefixLength,
boolean transpositions)
Constructor for enumeration of all terms from specified
reader which share a prefix of
length prefixLength with term and which have a fuzzy similarity >
minSimilarity . |
PrefixFilter(Term prefix)
Deprecated.
|
PrefixQuery(Term prefix)
Constructs a query for terms starting with
prefix . |
RegexpQuery(Term term)
Constructs a query for terms matching
term . |
RegexpQuery(Term term,
int flags)
Constructs a query for terms matching
term . |
RegexpQuery(Term term,
int flags,
AutomatonProvider provider,
int maxDeterminizedStates)
Constructs a query for terms matching
term . |
RegexpQuery(Term term,
int flags,
int maxDeterminizedStates)
Constructs a query for terms matching
term . |
TermQuery(Term t)
Constructs a query for the term
t . |
TermQuery(Term t,
TermContext states)
Expert: constructs a TermQuery that will use the provided docFreq instead
of looking up the docFreq against the searcher.
|
WildcardQuery(Term term)
Constructs a query for terms matching
term . |
WildcardQuery(Term term,
int maxDeterminizedStates)
Constructs a query for terms matching
term . |
Modifier and Type | Method and Description |
---|---|
void |
PayloadSpanCollector.collectLeaf(PostingsEnum postings,
int position,
Term term) |
Modifier and Type | Method and Description |
---|---|
void |
SpanPayloadCheckQuery.SpanPayloadCheckWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanPayloadCheckQuery.SpanPayloadCheckWeight.extractTerms(Set<Term> terms) |
Constructor and Description |
---|
PayloadTermQuery(Term term,
PayloadFunction function)
Deprecated.
|
PayloadTermQuery(Term term,
PayloadFunction function,
boolean includeSpanScore)
Deprecated.
|
Constructor and Description |
---|
PayloadNearSpanWeight(List<SpanWeight> subWeights,
IndexSearcher searcher,
Map<Term,TermContext> terms) |
SpanPayloadCheckWeight(IndexSearcher searcher,
Map<Term,TermContext> termContexts,
SpanWeight matchWeight) |
Modifier and Type | Field and Description |
---|---|
protected Term |
TermSpans.term |
protected Term |
SpanTermQuery.term |
Modifier and Type | Method and Description |
---|---|
Term |
SpanTermQuery.getTerm()
Return the term whose spans are matched.
|
Modifier and Type | Method and Description |
---|---|
protected static Map<Term,TermContext> |
SpanQuery.getTermContexts(Collection<SpanWeight> weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
protected static Map<Term,TermContext> |
SpanQuery.getTermContexts(SpanWeight... weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
Modifier and Type | Method and Description |
---|---|
void |
SpanCollector.collectLeaf(PostingsEnum postings,
int position,
Term term)
Collect information from postings
|
Modifier and Type | Method and Description |
---|---|
void |
AssertingSpanWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanNearQuery.SpanNearWeight.extractTermContexts(Map<Term,TermContext> contexts) |
abstract void |
SpanWeight.extractTermContexts(Map<Term,TermContext> contexts)
Collect all TermContexts used by this Weight
|
void |
SpanPositionCheckQuery.SpanPositionCheckWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanNotQuery.SpanNotWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanTermQuery.SpanTermWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanOrQuery.SpanOrWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
AssertingSpanWeight.extractTerms(Set<Term> terms) |
void |
SpanNearQuery.SpanNearWeight.extractTerms(Set<Term> terms) |
void |
SpanPositionCheckQuery.SpanPositionCheckWeight.extractTerms(Set<Term> terms) |
void |
SpanNotQuery.SpanNotWeight.extractTerms(Set<Term> terms) |
void |
SpanTermQuery.SpanTermWeight.extractTerms(Set<Term> terms) |
void |
SpanOrQuery.SpanOrWeight.extractTerms(Set<Term> terms) |
Constructor and Description |
---|
SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.
|
SpanTermQuery(Term term,
TermContext context)
Expert: Construct a SpanTermQuery matching the named term's spans, using
the provided TermContext
|
TermSpans(PostingsEnum postings,
Term term) |
Constructor and Description |
---|
SpanContainingWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight bigWeight,
SpanWeight littleWeight) |
SpanNearWeight(List<SpanWeight> subWeights,
IndexSearcher searcher,
Map<Term,TermContext> terms) |
SpanNotWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight includeWeight,
SpanWeight excludeWeight) |
SpanOrWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
List<SpanWeight> subWeights) |
SpanPositionCheckWeight(SpanWeight matchWeight,
IndexSearcher searcher,
Map<Term,TermContext> terms) |
SpanTermWeight(TermContext termContext,
IndexSearcher searcher,
Map<Term,TermContext> terms) |
SpanWeight(SpanQuery query,
IndexSearcher searcher,
Map<Term,TermContext> termContexts)
Create a new SpanWeight
|
SpanWithinWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight bigWeight,
SpanWeight littleWeight) |
Modifier and Type | Field and Description |
---|---|
static Term |
WordBreakSpellChecker.SEPARATOR_TERM
Term that can be used to prohibit adjacent terms from being combined
|
Modifier and Type | Method and Description |
---|---|
SuggestWord[] |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir)
|
protected Collection<DirectSpellChecker.ScoreTerm> |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir,
int docfreq,
int editDistance,
float accuracy,
CharsRefBuilder spare)
Provide spelling corrections based on several parameters.
|
SuggestWord[] |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir,
SuggestMode suggestMode)
|
SuggestWord[] |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir,
SuggestMode suggestMode,
float accuracy)
Suggest similar words.
|
SuggestWord[][] |
WordBreakSpellChecker.suggestWordBreaks(Term term,
int maxSuggestions,
IndexReader ir,
SuggestMode suggestMode,
WordBreakSpellChecker.BreakSuggestionSortMethod sortMethod)
Generate suggestions by breaking the passed-in term into multiple words.
|
CombineSuggestion[] |
WordBreakSpellChecker.suggestWordCombinations(Term[] terms,
int maxSuggestions,
IndexReader ir,
SuggestMode suggestMode)
Generate suggestions by combining one or more of the passed-in terms into
single words.
|
Modifier and Type | Method and Description |
---|---|
Term |
CompletionQuery.getTerm()
Returns the term to be queried against
|
Modifier and Type | Method and Description |
---|---|
void |
CompletionWeight.extractTerms(Set<Term> terms) |
Modifier and Type | Method and Description |
---|---|
protected Query |
QueryBuilder.newTermQuery(Term term)
Builds a new TermQuery instance.
|
Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.