Uses of Class
org.apache.lucene.index.Term
-
Packages that use Term Package Description org.apache.lucene.analysis.query Automatically filter high-frequency stopwords.org.apache.lucene.classification Uses already seen data (the indexed documents) to classify an input ( can be simple text or a structured document).org.apache.lucene.classification.document Uses already seen data (the indexed documents) to classify new documents.org.apache.lucene.classification.utils Utilities for evaluation, data preparation, etc.org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.misc Miscellaneous Lucene utilities that don't really fit anywhere else.org.apache.lucene.misc.index Misc index tools and index support.org.apache.lucene.monitor Monitoring frameworkorg.apache.lucene.payloads Experimental classes for interacting with payloadsorg.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.queries.payloads The payloads package provides Query mechanisms for finding and using payloads.org.apache.lucene.queries.spans The calculus of spans.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.search This package contains a flexible graph-based proximity query, TermAutomatonQuery, and geospatial queries.org.apache.lucene.search Code to search indices.org.apache.lucene.search.highlight Highlighting search terms.org.apache.lucene.search.spell Suggest alternate spellings for words.org.apache.lucene.search.suggest.document Support for document suggestionorg.apache.lucene.search.uhighlight The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.org.apache.lucene.search.vectorhighlight Another highlighter implementation based on term vectors.org.apache.lucene.util Some utility classes.org.apache.lucene.util.graph Utility classes for working with token streams as graphs. -
-
Uses of Term in org.apache.lucene.analysis.query
Methods in org.apache.lucene.analysis.query that return Term Modifier and Type Method Description Term[]
QueryAutoStopWordAnalyzer. getStopWords()
Provides information on which stop words have been identified for all fields -
Uses of Term in org.apache.lucene.classification
Methods in org.apache.lucene.classification with parameters of type Term Modifier and Type Method Description private double
BM25NBClassifier. calculateLogLikelihood(java.lang.String[] tokens, Term term)
private double
SimpleNaiveBayesClassifier. calculateLogLikelihood(java.lang.String[] tokenizedText, Term term, int docsWithClass)
private double
BM25NBClassifier. calculateLogPrior(Term term)
private double
SimpleNaiveBayesClassifier. calculateLogPrior(Term term, int docsWithClassSize)
private int
SimpleNaiveBayesClassifier. docCount(Term term)
private double
BM25NBClassifier. getTermProbForClass(Term classTerm, java.lang.String... words)
private double
SimpleNaiveBayesClassifier. getTextTermFreqForClass(Term term)
Returns the average number of unique terms times the number of docs belonging to the input classprivate int
SimpleNaiveBayesClassifier. getWordFreqForClass(java.lang.String word, Term term)
Returns the number of documents of the input class ( from the whole index or from a subset) that contains the word ( in a specific field or in all the fields if no one selected) -
Uses of Term in org.apache.lucene.classification.document
Methods in org.apache.lucene.classification.document with parameters of type Term Modifier and Type Method Description private double
SimpleNaiveBayesDocumentClassifier. calculateLogLikelihood(java.lang.String[] tokenizedText, java.lang.String fieldName, Term term, int docsWithClass)
private double
SimpleNaiveBayesDocumentClassifier. calculateLogPrior(Term term, int docsWithClassSize)
private int
SimpleNaiveBayesDocumentClassifier. docCount(Term term)
private double
SimpleNaiveBayesDocumentClassifier. getTextTermFreqForClass(Term term, java.lang.String fieldName)
Returns the average number of unique terms times the number of docs belonging to the input classprivate int
SimpleNaiveBayesDocumentClassifier. getWordFreqForClass(java.lang.String word, java.lang.String fieldName, Term term)
Returns the number of documents of the input class ( from the whole index or from a subset) that contains the word ( in a specific field or in all the fields if no one selected) -
Uses of Term in org.apache.lucene.classification.utils
Fields in org.apache.lucene.classification.utils declared as Term Modifier and Type Field Description (package private) Term
NearestFuzzyQuery.ScoreTerm. fuzziedSourceTerm
Term
NearestFuzzyQuery.ScoreTerm. term
Methods in org.apache.lucene.classification.utils with parameters of type Term Modifier and Type Method Description private Query
NearestFuzzyQuery. newTermQuery(IndexReader reader, Term term)
Constructors in org.apache.lucene.classification.utils with parameters of type Term Constructor Description ScoreTerm(Term term, float score, Term fuzziedSourceTerm)
-
Uses of Term in org.apache.lucene.index
Fields in org.apache.lucene.index declared as Term Modifier and Type Field Description private Term
PrefixCodedTerms.Builder. lastTerm
(package private) Term
DocValuesUpdate. term
private Term
TermStates. term
Methods in org.apache.lucene.index that return types with arguments of type Term Modifier and Type Method Description (package private) java.util.Set<Term>
BufferedUpdates.DeletedTerms. keySet()
Just for test, not efficient.(package private) static DocumentsWriterDeleteQueue.Node<Term>
DocumentsWriterDeleteQueue. newNode(Term term)
Methods in org.apache.lucene.index with parameters of type Term Modifier and Type Method Description void
BufferedUpdates.DeletedTerms.DeletedTermConsumer. accept(Term term, int docId)
void
PrefixCodedTerms.Builder. add(Term term)
add a term(package private) long
DocumentsWriterDeleteQueue. addDelete(Term... terms)
(package private) void
FieldUpdatesBuffer. addNoValue(Term term, int docUpTo)
void
BufferedUpdates. addTerm(Term term, int docIDUpto)
(package private) void
FieldUpdatesBuffer. addUpdate(Term term, long value, int docUpTo)
(package private) void
FieldUpdatesBuffer. addUpdate(Term term, BytesRef value, int docUpTo)
private int
FieldUpdatesBuffer. append(Term term)
static TermStates
TermStates. build(IndexSearcher indexSearcher, Term term, boolean needsStats)
private DocValuesUpdate[]
IndexWriter. buildDocValuesUpdate(Term term, Field[] updates)
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
IndexWriter. deleteDocuments(Term... terms)
Deletes the document(s) containing any of the terms.(package private) long
DocumentsWriter. deleteTerms(Term... terms)
int
BaseCompositeReader. docFreq(Term term)
abstract int
IndexReader. docFreq(Term term)
Returns the number of documents containing theterm
.int
LeafReader. docFreq(Term term)
(package private) int
BufferedUpdates.DeletedTerms. get(Term term)
Get the newest doc id of the deleted term.private static TermsEnum
TermStates. loadTermsEnum(LeafReaderContext ctx, Term term)
(package private) static DocumentsWriterDeleteQueue.Node<Term>
DocumentsWriterDeleteQueue. newNode(Term term)
PostingsEnum
LeafReader. postings(Term term)
ReturnsPostingsEnum
for the specified term withPostingsEnum.FREQS
.PostingsEnum
LeafReader. postings(Term term, int flags)
ReturnsPostingsEnum
for the specified term.(package private) void
BufferedUpdates.DeletedTerms. put(Term term, int value)
Put the newest doc id of the deleted term.long
IndexWriter. softUpdateDocument(Term term, java.lang.Iterable<? extends IndexableField> doc, Field... softDeletes)
Expert: Updates a document by first updating the document(s) containingterm
with the given doc-values fields and then adding the new document.long
IndexWriter. softUpdateDocuments(Term term, java.lang.Iterable<? extends java.lang.Iterable<? extends IndexableField>> docs, Field... softDeletes)
Expert: Atomically updates documents matching the provided term with the given doc-values fields and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.long
BaseCompositeReader. totalTermFreq(Term term)
abstract long
IndexReader. totalTermFreq(Term term)
Returns the total number of occurrences ofterm
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 termt
.long
IndexWriter. updateBinaryDocValue(Term term, java.lang.String field, BytesRef value)
long
IndexWriter. updateDocument(Term term, java.lang.Iterable<? extends IndexableField> doc)
Updates a document by first deleting the document(s) containingterm
and then adding the new document.long
IndexWriter. updateDocuments(Term delTerm, java.lang.Iterable<? extends java.lang.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.long
IndexWriter. updateDocValues(Term term, Field... updates)
Updates documents' DocValues fields to the given values.long
IndexWriter. updateNumericDocValue(Term term, java.lang.String field, long value)
Constructors in org.apache.lucene.index with parameters of type Term Constructor Description BinaryDocValuesUpdate(Term term, java.lang.String field, BytesRef value)
BinaryDocValuesUpdate(Term term, java.lang.String field, BytesRef value, int docIDUpTo)
DocValuesUpdate(DocValuesType type, Term term, java.lang.String field, int docIDUpTo, boolean hasValue)
Constructor.NumericDocValuesUpdate(Term term, java.lang.String field, long value)
NumericDocValuesUpdate(Term term, java.lang.String field, long value, int docIDUpTo, boolean hasValue)
NumericDocValuesUpdate(Term term, java.lang.String field, java.lang.Long value)
TermArrayNode(Term[] term)
TermNode(Term term)
TermStates(Term term, IndexReaderContext context)
-
Uses of Term in org.apache.lucene.misc
Methods in org.apache.lucene.misc with parameters of type Term Modifier and Type Method Description static void
GetTermInfo. getTermInfo(Directory dir, Term term)
-
Uses of Term in org.apache.lucene.misc.index
Constructors in org.apache.lucene.misc.index with parameters of type Term Constructor 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)
-
Uses of Term in org.apache.lucene.monitor
Methods in org.apache.lucene.monitor with parameters of type Term Modifier and Type Method Description void
QueryAnalyzer.QueryBuilder. consumeTerms(Query query, Term... terms)
static QueryTree
QueryTree. term(Term term, double weight)
Returns a leaf node for a particular term and weightstatic QueryTree
QueryTree. term(Term term, TermWeightor weightor)
Returns a leaf node for a particular termstatic TermWeightor
TermWeightor. termAndFieldWeightor(double weight, Term... terms)
QueryTerms with a term and field value from the selected set will be assigned the given weightMethod parameters in org.apache.lucene.monitor with type arguments of type Term Modifier and Type Method Description static TermWeightor
TermWeightor. termAndFieldWeightor(double weight, java.util.Set<Term> terms)
QueryTerms with a term and field value from the selected set will be assigned the given weight -
Uses of Term in org.apache.lucene.payloads
Methods in org.apache.lucene.payloads with parameters of type Term Modifier and Type Method Description void
PayloadSpanCollector. collectLeaf(PostingsEnum postings, int position, Term term)
-
Uses of Term in org.apache.lucene.queries
Fields in org.apache.lucene.queries with type parameters of type Term Modifier and Type Field Description protected java.util.List<Term>
CommonTermsQuery. terms
Methods in org.apache.lucene.queries that return types with arguments of type Term Modifier and Type Method Description java.util.List<Term>
CommonTermsQuery. getTerms()
Gets the list of terms.Methods in org.apache.lucene.queries with parameters of type Term Modifier and Type Method Description void
CommonTermsQuery. add(Term term)
Adds a term to theCommonTermsQuery
protected Query
CommonTermsQuery. buildQuery(int maxDoc, TermStates[] contextArray, Term[] queryTerms)
void
CommonTermsQuery. collectTermStates(IndexReader reader, java.util.List<LeafReaderContext> leaves, TermStates[] contextArray, Term[] queryTerms)
protected Query
CommonTermsQuery. newTermQuery(Term term, TermStates termStates)
Builds a new TermQuery instance. -
Uses of Term in org.apache.lucene.queries.function
Fields in org.apache.lucene.queries.function declared as Term Modifier and Type Field Description private Term
IndexReaderFunctions.TermFreqDoubleValuesSource. term
Methods in org.apache.lucene.queries.function with parameters of type Term Modifier and Type Method Description static DoubleValuesSource
IndexReaderFunctions. docFreq(Term term)
Creates a constant value source returning the docFreq of a given termstatic DoubleValuesSource
IndexReaderFunctions. termFreq(Term term)
Creates a value source that returns the term freq of a given term for each documentstatic DoubleValuesSource
IndexReaderFunctions. totalTermFreq(Term term)
Creates a constant value source returning the totalTermFreq for a given termConstructors in org.apache.lucene.queries.function with parameters of type Term Constructor Description TermFreqDoubleValuesSource(Term term)
-
Uses of Term in org.apache.lucene.queries.payloads
Methods in org.apache.lucene.queries.payloads with parameters of type Term Modifier and Type Method Description void
PayloadScoreQuery.PayloadSpans. collectLeaf(PostingsEnum postings, int position, Term term)
void
SpanPayloadCheckQuery.PayloadChecker. collectLeaf(PostingsEnum postings, int position, Term term)
Method parameters in org.apache.lucene.queries.payloads with type arguments of type Term Modifier and Type Method Description void
PayloadScoreQuery.PayloadSpanWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanPayloadCheckQuery.SpanPayloadCheckWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
Constructor parameters in org.apache.lucene.queries.payloads with type arguments of type Term Constructor Description SpanPayloadCheckWeight(IndexSearcher searcher, java.util.Map<Term,TermStates> termStates, SpanWeight matchWeight, float boost, SpanPayloadCheckQuery.PayloadType payloadType)
-
Uses of Term in org.apache.lucene.queries.spans
Fields in org.apache.lucene.queries.spans declared as Term Modifier and Type Field Description protected Term
SpanTermQuery. term
(package private) Term
SpanWeight.TermMatch. term
protected Term
TermSpans. term
Methods in org.apache.lucene.queries.spans that return Term Modifier and Type Method Description Term
SpanTermQuery. getTerm()
Return the term whose spans are matched.Methods in org.apache.lucene.queries.spans that return types with arguments of type Term Modifier and Type Method Description static java.util.Map<Term,TermStates>
SpanQuery. getTermStates(java.util.Collection<SpanWeight> weights)
Build a map of terms toTermStates
, for use in constructing SpanWeightsstatic java.util.Map<Term,TermStates>
SpanQuery. getTermStates(SpanWeight... weights)
Build a map of terms toTermStates
, for use in constructing SpanWeightsMethods in org.apache.lucene.queries.spans with parameters of type Term Modifier and Type Method Description void
SpanCollector. collectLeaf(PostingsEnum postings, int position, Term term)
Collect information from postingsMethod parameters in org.apache.lucene.queries.spans with type arguments of type Term Modifier and Type Method Description private Similarity.SimScorer
SpanWeight. buildSimWeight(SpanQuery query, IndexSearcher searcher, java.util.Map<Term,TermStates> termStates, float boost)
void
SpanContainQuery.SpanContainWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanNearQuery.SpanGapQuery.SpanGapWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanNearQuery.SpanNearWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanNotQuery.SpanNotWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanOrQuery.SpanOrWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanPositionCheckQuery.SpanPositionCheckWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
void
SpanTermQuery.SpanTermWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
abstract void
SpanWeight. extractTermStates(java.util.Map<Term,TermStates> contexts)
Collect all TermStates used by this WeightConstructors in org.apache.lucene.queries.spans with parameters of type Term Constructor Description SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.SpanTermQuery(Term term, TermStates termStates)
Expert: Construct a SpanTermQuery matching the named term's spans, using the provided TermStatesTermSpans(LeafSimScorer scorer, PostingsEnum postings, Term term, float positionsCost)
Constructor parameters in org.apache.lucene.queries.spans with type arguments of type Term Constructor Description SpanContainingWeight(IndexSearcher searcher, java.util.Map<Term,TermStates> terms, SpanWeight bigWeight, SpanWeight littleWeight, float boost)
SpanContainWeight(IndexSearcher searcher, java.util.Map<Term,TermStates> terms, SpanWeight bigWeight, SpanWeight littleWeight, float boost)
SpanNearWeight(java.util.List<SpanWeight> subWeights, IndexSearcher searcher, java.util.Map<Term,TermStates> terms, float boost)
SpanNotWeight(IndexSearcher searcher, java.util.Map<Term,TermStates> terms, SpanWeight includeWeight, SpanWeight excludeWeight, float boost)
SpanOrWeight(IndexSearcher searcher, java.util.Map<Term,TermStates> terms, java.util.List<SpanWeight> subWeights, float boost)
SpanPositionCheckWeight(SpanWeight matchWeight, IndexSearcher searcher, java.util.Map<Term,TermStates> terms, float boost)
SpanTermWeight(TermStates termStates, IndexSearcher searcher, java.util.Map<Term,TermStates> terms, float boost)
SpanWeight(SpanQuery query, IndexSearcher searcher, java.util.Map<Term,TermStates> termStates, float boost)
Create a new SpanWeightSpanWithinWeight(IndexSearcher searcher, java.util.Map<Term,TermStates> terms, SpanWeight bigWeight, SpanWeight littleWeight, float boost)
-
Uses of Term in org.apache.lucene.queryparser.classic
Methods in org.apache.lucene.queryparser.classic with parameters of type Term Modifier and Type Method Description protected Query
QueryParserBase. newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Builds a new FuzzyQuery instanceprotected Query
QueryParserBase. newPrefixQuery(Term prefix)
Builds a new PrefixQuery instanceprotected Query
QueryParserBase. newRegexpQuery(Term regexp)
Builds a new RegexpQuery instanceprotected Query
QueryParserBase. newWildcardQuery(Term t)
Builds a new WildcardQuery instance -
Uses of Term in org.apache.lucene.queryparser.complexPhrase
Methods in org.apache.lucene.queryparser.complexPhrase with parameters of type Term Modifier and Type Method Description protected Query
ComplexPhraseQueryParser. newTermQuery(Term term, float boost)
-
Uses of Term in org.apache.lucene.queryparser.surround.query
Methods in org.apache.lucene.queryparser.surround.query that return Term Modifier and Type Method Description Term
SrndTermQuery. getLuceneTerm(java.lang.String fieldName)
Methods in org.apache.lucene.queryparser.surround.query with parameters of type Term Modifier and Type Method Description void
SpanNearClauseFactory. addTermWeighted(Term t, float weight)
SpanTermQuery
BasicQueryFactory. newSpanTermQuery(Term term)
TermQuery
BasicQueryFactory. newTermQuery(Term term)
void
SimpleTerm.MatchingTermVisitor. visitMatchingTerm(Term t)
-
Uses of Term in org.apache.lucene.sandbox.queries
Fields in org.apache.lucene.sandbox.queries declared as Term Modifier and Type Field Description (package private) Term
FuzzyLikeThisQuery.ScoreTerm. fuzziedSourceTerm
Term
FuzzyLikeThisQuery.ScoreTerm. term
Methods in org.apache.lucene.sandbox.queries with parameters of type Term Modifier and Type Method Description private Query
FuzzyLikeThisQuery. newTermQuery(IndexReader reader, Term term)
Constructors in org.apache.lucene.sandbox.queries with parameters of type Term Constructor Description ScoreTerm(Term term, float score, Term fuzziedSourceTerm)
-
Uses of Term in org.apache.lucene.sandbox.search
Fields in org.apache.lucene.sandbox.search declared as Term Modifier and Type Field Description private Term[]
CombinedFieldQuery. fieldTerms
protected Term
PhraseWildcardQuery.SingleTerm. term
Fields in org.apache.lucene.sandbox.search with type parameters of type Term Modifier and Type Field Description protected java.util.List<Term>
PhraseWildcardQuery.TermData. terms
Methods in org.apache.lucene.sandbox.search that return types with arguments of type Term Modifier and Type Method Description java.util.List<Term>
CombinedFieldQuery. getTerms()
Methods in org.apache.lucene.sandbox.search with parameters of type Term Modifier and Type Method Description PhraseWildcardQuery.Builder
PhraseWildcardQuery.Builder. addTerm(Term term)
Adds a single term at the next position in the phrase.Constructors in org.apache.lucene.sandbox.search with parameters of type Term Constructor Description SingleTerm(Term term, int termPosition)
-
Uses of Term in org.apache.lucene.search
Fields in org.apache.lucene.search declared as Term Modifier and Type Field Description protected Term
AutomatonQuery. term
term containing the field, and possibly some pattern structureprivate Term
FuzzyQuery. term
private Term
FuzzyTermsEnum. term
private Term
TermQuery. term
private Term[][]
MultiPhraseQuery. termArrays
private Term[]
BlendedTermQuery.Builder. terms
private Term[]
BlendedTermQuery. terms
(package private) Term[]
PhrasePositions. terms
(package private) Term[]
PhraseQuery.PostingsAndFreq. terms
private Term[]
PhraseQuery. terms
Fields in org.apache.lucene.search with type parameters of type Term Modifier and Type Field Description private java.util.List<Term>
PhraseQuery.Builder. terms
Methods in org.apache.lucene.search that return Term Modifier and Type Method Description Term
PrefixQuery. getPrefix()
Returns the prefix of this query.Term
RegexpQuery. getRegexp()
Returns the regexp of this query wrapped in a Term.Term
FuzzyQuery. getTerm()
Returns the pattern term.Term
TermQuery. getTerm()
Returns the term of this query.Term
WildcardQuery. getTerm()
Returns the pattern term.Term[][]
MultiPhraseQuery. getTermArrays()
Returns the arrays of arrays of terms in the multi-phrase.Term[]
NGramPhraseQuery. getTerms()
Return the list of terms.Term[]
PhraseQuery. getTerms()
Returns the list of terms in this phrase.private static Term[]
PhraseQuery. toTerms(java.lang.String field, java.lang.String... termStrings)
private static Term[]
PhraseQuery. toTerms(java.lang.String field, BytesRef... termBytes)
Methods in org.apache.lucene.search that return types with arguments of type Term Modifier and Type Method Description java.util.List<Term>
SynonymQuery. getTerms()
Returns the terms of thisSynonymQuery
private java.util.LinkedHashMap<Term,java.lang.Integer>
SloppyPhraseMatcher. repeatingTerms()
find repeating terms and assign them ordinal valuesprivate java.util.HashMap<Term,java.lang.Integer>
SloppyPhraseMatcher. termGroups(java.util.LinkedHashMap<Term,java.lang.Integer> tord, java.util.ArrayList<FixedBitSet> bb)
map each term to the single group that contains itMethods in org.apache.lucene.search with parameters of type Term Modifier and Type Method Description BlendedTermQuery.Builder
BlendedTermQuery.Builder. add(Term term)
Add a newTerm
to this builder, with a default boost of1
.BlendedTermQuery.Builder
BlendedTermQuery.Builder. add(Term term, float boost)
Add aTerm
with the provided boost.BlendedTermQuery.Builder
BlendedTermQuery.Builder. add(Term term, float boost, TermStates context)
Expert: Add aTerm
with the provided boost and context.MultiPhraseQuery.Builder
MultiPhraseQuery.Builder. add(Term term)
Add a single term at the next position in the phrase.MultiPhraseQuery.Builder
MultiPhraseQuery.Builder. add(Term[] terms)
Add multiple terms at the next position in the phrase.MultiPhraseQuery.Builder
MultiPhraseQuery.Builder. add(Term[] terms, int position)
Allows to specify the relative position of terms within the phrase.PhraseQuery.Builder
PhraseQuery.Builder. add(Term term)
Adds a term to the end of the query phrase.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, TermStates states)
protected void
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite. addClause(BooleanQuery.Builder topLevel, Term term, int docFreq, float boost, TermStates states)
protected void
MultiTermQuery.TopTermsScoringBooleanQueryRewrite. addClause(BooleanQuery.Builder topLevel, Term term, int docCount, float boost, TermStates states)
protected void
TermCollectingRewrite. addClause(B topLevel, Term term, int docCount, float boost)
Add a MultiTermQuery term to the top-level query builder.protected abstract void
TermCollectingRewrite. addClause(B topLevel, Term term, int docCount, float boost, TermStates states)
SynonymQuery.Builder
SynonymQuery.Builder. addTerm(Term term)
Adds the providedterm
as a synonym.SynonymQuery.Builder
SynonymQuery.Builder. addTerm(Term term, float boost)
Adds the providedterm
as a synonym, document frequencies of this term will be boosted byboost
.void
QueryVisitor. consumeTerms(Query query, Term... terms)
Called by leaf queries that match on specific termsprivate boolean
MultiPhraseQuery. termArraysEquals(Term[][] termArrays1, Term[][] termArrays2)
private static boolean
PhraseQuery. termNotInReader(LeafReader reader, Term term)
private boolean
TermQuery.TermWeight. termNotInReader(LeafReader reader, Term term)
TermStatistics
IndexSearcher. termStatistics(Term term, int docFreq, long totalTermFreq)
ReturnsTermStatistics
for a term.static Automaton
WildcardQuery. toAutomaton(Term wildcardquery)
Convert Lucene wildcard syntax into an automaton.Method parameters in org.apache.lucene.search with type arguments of type Term Modifier and Type Method Description private static BytesRefIterator
DisjunctionMatchesIterator. asBytesRefIterator(java.util.List<Term> terms)
(package private) static MatchesIterator
DisjunctionMatchesIterator. fromTerms(LeafReaderContext context, int doc, Query query, java.lang.String field, java.util.List<Term> terms)
Create aDisjunctionMatchesIterator
over a list of termsprivate java.util.ArrayList<java.util.ArrayList<PhrasePositions>>
SloppyPhraseMatcher. gatherRptGroups(java.util.LinkedHashMap<Term,java.lang.Integer> rptTerms)
Detect repetition groups.private java.util.ArrayList<FixedBitSet>
SloppyPhraseMatcher. ppTermsBitSets(PhrasePositions[] rpp, java.util.HashMap<Term,java.lang.Integer> tord)
bit-sets - for each repeating pp, for each of its repeating terms, the term ordinal values is setprivate PhrasePositions[]
SloppyPhraseMatcher. repeatingPPs(java.util.HashMap<Term,java.lang.Integer> rptTerms)
find repeating pps, and for each, if has multi-terms, update this.hasMultiTermRptsstatic QueryVisitor
QueryVisitor. termCollector(java.util.Set<Term> termSet)
Builds aQueryVisitor
instance that collects all terms that may match a queryprivate java.util.HashMap<Term,java.lang.Integer>
SloppyPhraseMatcher. termGroups(java.util.LinkedHashMap<Term,java.lang.Integer> tord, java.util.ArrayList<FixedBitSet> bb)
map each term to the single group that contains itConstructors in org.apache.lucene.search with parameters of type Term Constructor Description AutomatonQuery(Term term, Automaton automaton)
Create a new AutomatonQuery from anAutomaton
.AutomatonQuery(Term term, Automaton automaton, int determinizeWorkLimit)
Create a new AutomatonQuery from anAutomaton
.AutomatonQuery(Term term, Automaton automaton, int determinizeWorkLimit, boolean isBinary)
Create a new AutomatonQuery from anAutomaton
.AutomatonQuery(Term term, Automaton automaton, int determinizeWorkLimit, boolean isBinary, MultiTermQuery.RewriteMethod rewriteMethod)
Create a new AutomatonQuery from anAutomaton
.BlendedTermQuery(Term[] terms, float[] boosts, TermStates[] contexts, BlendedTermQuery.RewriteMethod rewriteMethod)
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)
CallsFuzzyQuery(Term, int, int, int, boolean, org.apache.lucene.search.MultiTermQuery.RewriteMethod)
FuzzyQuery(term, maxEdits, prefixLength, maxExpansions, defaultRewriteMethod(maxExpansions))FuzzyQuery(Term term, int maxEdits, int prefixLength, int maxExpansions, boolean transpositions, MultiTermQuery.RewriteMethod rewriteMethod)
Create a new FuzzyQuery that will match terms with an edit distance of at mostmaxEdits
toterm
.FuzzyTermsEnum(Terms terms, Term term, int maxEdits, int prefixLength, boolean transpositions)
Constructor for enumeration of all terms from specifiedreader
which share a prefix of lengthprefixLength
withterm
and which have at mostmaxEdits
edits.FuzzyTermsEnum(Terms terms, AttributeSource atts, Term term, int maxEdits, int prefixLength, boolean transpositions)
Constructor for enumeration of all terms from specifiedreader
which share a prefix of lengthprefixLength
withterm
and which have at mostmaxEdits
edits.FuzzyTermsEnum(Terms terms, AttributeSource atts, Term term, java.util.function.Supplier<FuzzyAutomatonBuilder> automatonBuilder)
MultiPhraseQuery(java.lang.String field, Term[][] termArrays, int[] positions, int slop)
PhrasePositions(PostingsEnum postings, int o, int ord, Term[] terms)
PhraseQuery(int slop, Term[] terms, int[] positions)
PostingsAndFreq(PostingsEnum postings, ImpactsEnum impacts, int position, Term... terms)
Creates PostingsAndFreq instancePrefixQuery(Term prefix)
Constructs a query for terms starting withprefix
.PrefixQuery(Term prefix, MultiTermQuery.RewriteMethod rewriteMethod)
Constructs a query for terms starting withprefix
using a defined RewriteMethodRegexpQuery(Term term)
Constructs a query for terms matchingterm
.RegexpQuery(Term term, int flags)
Constructs a query for terms matchingterm
.RegexpQuery(Term term, int flags, int determinizeWorkLimit)
Constructs a query for terms matchingterm
.RegexpQuery(Term term, int syntax_flags, int match_flags, int determinizeWorkLimit)
Constructs a query for terms matchingterm
.RegexpQuery(Term term, int syntax_flags, int match_flags, AutomatonProvider provider, int determinizeWorkLimit, MultiTermQuery.RewriteMethod rewriteMethod)
Constructs a query for terms matchingterm
.RegexpQuery(Term term, int syntax_flags, AutomatonProvider provider, int determinizeWorkLimit)
Constructs a query for terms matchingterm
.TermQuery(Term t)
Constructs a query for the termt
.TermQuery(Term t, TermStates 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 matchingterm
.WildcardQuery(Term term, int determinizeWorkLimit)
Constructs a query for terms matchingterm
.WildcardQuery(Term term, int determinizeWorkLimit, MultiTermQuery.RewriteMethod rewriteMethod)
Constructs a query for terms matchingterm
.Constructor parameters in org.apache.lucene.search with type arguments of type Term Constructor Description PostingsAndFreq(PostingsEnum postings, ImpactsEnum impacts, int position, java.util.List<Term> terms)
-
Uses of Term in org.apache.lucene.search.highlight
Methods in org.apache.lucene.search.highlight with parameters of type Term Modifier and Type Method Description void
QueryTermExtractor.BoostedTermExtractor. consumeTerms(Query query, Term... terms)
-
Uses of Term in org.apache.lucene.search.spell
Fields in org.apache.lucene.search.spell declared as Term Modifier and Type Field Description static Term
WordBreakSpellChecker. SEPARATOR_TERM
Term that can be used to prohibit adjacent terms from being combinedMethods in org.apache.lucene.search.spell with parameters of type Term Modifier and Type Method Description private int
WordBreakSpellChecker. generateBreakUpSuggestions(Term term, IndexReader ir, int numberBreaks, int maxSuggestions, int useMinSuggestionFrequency, SuggestWord[] prefix, java.util.Queue<WordBreakSpellChecker.SuggestWordArrayWrapper> suggestions, int totalEvaluations, WordBreakSpellChecker.BreakSuggestionSortMethod sortMethod)
SuggestWord[]
DirectSpellChecker. suggestSimilar(Term term, int numSug, IndexReader ir)
protected java.util.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. -
Uses of Term in org.apache.lucene.search.suggest.document
Fields in org.apache.lucene.search.suggest.document declared as Term Modifier and Type Field Description private Term
CompletionQuery. term
Term to query againstMethods in org.apache.lucene.search.suggest.document that return Term Modifier and Type Method Description Term
CompletionQuery. getTerm()
Returns the term to be queried againstConstructors in org.apache.lucene.search.suggest.document with parameters of type Term Constructor Description CompletionQuery(Term term, BitsProducer filter)
Creates a base Completion query against aterm
with afilter
to scope the documentsFuzzyCompletionQuery(Analyzer analyzer, Term term)
CallsFuzzyCompletionQuery(Analyzer, Term, BitsProducer)
with no filterFuzzyCompletionQuery(Analyzer analyzer, Term term, BitsProducer filter)
CallsFuzzyCompletionQuery(Analyzer, Term, BitsProducer, int, boolean, int, int, boolean, int)
with defaults formaxEdits
,transpositions
,nonFuzzyPrefix
,minFuzzyLength
,unicodeAware
anddeterminizeWorkLimit
SeeFuzzyCompletionQuery.DEFAULT_MAX_EDITS
,FuzzyCompletionQuery.DEFAULT_TRANSPOSITIONS
,FuzzyCompletionQuery.DEFAULT_NON_FUZZY_PREFIX
,FuzzyCompletionQuery.DEFAULT_MIN_FUZZY_LENGTH
,FuzzyCompletionQuery.DEFAULT_UNICODE_AWARE
andOperations.DEFAULT_DETERMINIZE_WORK_LIMIT
for defaultsFuzzyCompletionQuery(Analyzer analyzer, Term term, BitsProducer filter, int maxEdits, boolean transpositions, int nonFuzzyPrefix, int minFuzzyLength, boolean unicodeAware, int determinizeWorkLimit)
Constructs an analyzed fuzzy prefix completion queryPrefixCompletionQuery(Analyzer analyzer, Term term)
CallsPrefixCompletionQuery(Analyzer, Term, BitsProducer)
with no filterPrefixCompletionQuery(Analyzer analyzer, Term term, BitsProducer filter)
Constructs an analyzed prefix completion queryRegexCompletionQuery(Term term)
CallsRegexCompletionQuery(Term, BitsProducer)
with no filterRegexCompletionQuery(Term term, int flags, int determinizeWorkLimit)
CallsRegexCompletionQuery(Term, int, int, BitsProducer)
with no filterRegexCompletionQuery(Term term, int flags, int determinizeWorkLimit, BitsProducer filter)
Constructs a regular expression completion queryRegexCompletionQuery(Term term, BitsProducer filter)
CallsRegexCompletionQuery(Term, int, int, BitsProducer)
enabling all optional regex syntax anddeterminizeWorkLimit
of 10000 -
Uses of Term in org.apache.lucene.search.uhighlight
Methods in org.apache.lucene.search.uhighlight that return types with arguments of type Term Modifier and Type Method Description protected static java.util.Set<Term>
UnifiedHighlighter. extractTerms(Query query)
Extracts matching termsMethods in org.apache.lucene.search.uhighlight with parameters of type Term Modifier and Type Method Description void
PhraseHelper.OffsetSpanCollector. collectLeaf(PostingsEnum postings, int position, Term term)
Method parameters in org.apache.lucene.search.uhighlight with type arguments of type Term Modifier and Type Method Description protected static BytesRef[]
UnifiedHighlighter. filterExtractedTerms(java.util.function.Predicate<java.lang.String> fieldMatcher, java.util.Set<Term> queryTerms)
protected FieldHighlighter
UnifiedHighlighter. getFieldHighlighter(java.lang.String field, Query query, java.util.Set<Term> allTerms, int maxPassages)
protected UHComponents
UnifiedHighlighter. getHighlightComponents(java.lang.String field, Query query, java.util.Set<Term> allTerms)
-
Uses of Term in org.apache.lucene.search.vectorhighlight
Methods in org.apache.lucene.search.vectorhighlight with parameters of type Term Modifier and Type Method Description (package private) void
FieldQuery.QueryPhraseMap. addTerm(Term term, float boost)
private void
FieldQuery. checkOverlap(java.util.Collection<Query> expandQueries, Term[] src, Term[] dest, int slop, float boost)
-
Uses of Term in org.apache.lucene.util
Methods in org.apache.lucene.util with parameters of type Term Modifier and Type Method Description void
RamUsageEstimator.RamUsageQueryVisitor. consumeTerms(Query query, Term... terms)
protected Query
QueryBuilder. newTermQuery(Term term, float boost)
Builds a new TermQuery instance. -
Uses of Term in org.apache.lucene.util.graph
Methods in org.apache.lucene.util.graph that return Term Modifier and Type Method Description Term[]
GraphTokenStreamFiniteStrings. getTerms(java.lang.String field, int state)
Returns the list of terms that start at the provided state
-