Uses of Class
org.apache.lucene.index.Term
-
Packages that use Term Package Description org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.search Code to search indices.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.index
Methods in org.apache.lucene.index with parameters of type Term Modifier and Type Method Description voidPrefixCodedTerms.Builder. add(Term term)add a termstatic TermStatesTermStates. build(IndexSearcher indexSearcher, Term term, boolean needsStats)intTerm. 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.longIndexWriter. deleteDocuments(Term... terms)Deletes the document(s) containing any of the terms.intBaseCompositeReader. docFreq(Term term)abstract intIndexReader. docFreq(Term term)Returns the number of documents containing theterm.intLeafReader. docFreq(Term term)PostingsEnumLeafReader. postings(Term term)ReturnsPostingsEnumfor the specified term withPostingsEnum.FREQS.PostingsEnumLeafReader. postings(Term term, int flags)ReturnsPostingsEnumfor the specified term.longIndexWriter. softUpdateDocument(Term term, Iterable<? extends IndexableField> doc, Field... softDeletes)Expert: Updates a document by first updating the document(s) containingtermwith the given doc-values fields and then adding the new document.longIndexWriter. softUpdateDocuments(Term term, Iterable<? extends 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.longBaseCompositeReader. totalTermFreq(Term term)abstract longIndexReader. totalTermFreq(Term term)Returns the total number of occurrences oftermacross all documents (the sum of the freq() for each doc that has this term).longLeafReader. totalTermFreq(Term term)Returns the number of documents containing the termt.longIndexWriter. updateBinaryDocValue(Term term, String field, BytesRef value)longIndexWriter. updateDocument(Term term, Iterable<? extends IndexableField> doc)Updates a document by first deleting the document(s) containingtermand then adding the new document.longIndexWriter. 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.longIndexWriter. updateDocValues(Term term, Field... updates)Updates documents' DocValues fields to the given values.longIndexWriter. updateNumericDocValue(Term term, String field, long value) -
Uses of Term in org.apache.lucene.search
Fields in org.apache.lucene.search declared as Term Modifier and Type Field Description protected TermAutomatonQuery. termterm containing the field, and possibly some pattern structureMethods in org.apache.lucene.search that return Term Modifier and Type Method Description TermPrefixQuery. getPrefix()Returns the prefix of this query.TermRegexpQuery. getRegexp()Returns the regexp of this query wrapped in a Term.TermFuzzyQuery. getTerm()Returns the pattern term.TermTermQuery. getTerm()Returns the term of this query.TermWildcardQuery. 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.Methods in org.apache.lucene.search that return types with arguments of type Term Modifier and Type Method Description List<Term>SynonymQuery. getTerms()Returns the terms of thisSynonymQueryMethods in org.apache.lucene.search with parameters of type Term Modifier and Type Method Description BlendedTermQuery.BuilderBlendedTermQuery.Builder. add(Term term)Add a newTermto this builder, with a default boost of1.BlendedTermQuery.BuilderBlendedTermQuery.Builder. add(Term term, float boost)Add aTermwith the provided boost.BlendedTermQuery.BuilderBlendedTermQuery.Builder. add(Term term, float boost, TermStates context)Expert: Add aTermwith the provided boost and context.MultiPhraseQuery.BuilderMultiPhraseQuery.Builder. add(Term term)Add a single term at the next position in the phrase.MultiPhraseQuery.BuilderMultiPhraseQuery.Builder. add(Term[] terms)Add multiple terms at the next position in the phrase.MultiPhraseQuery.BuilderMultiPhraseQuery.Builder. add(Term[] terms, int position)Allows to specify the relative position of terms within the phrase.PhraseQuery.BuilderPhraseQuery.Builder. add(Term term)Adds a term to the end of the query phrase.PhraseQuery.BuilderPhraseQuery.Builder. add(Term term, int position)Adds a term to the end of the query phrase.protected voidMultiTermQuery.TopTermsBlendedFreqScoringRewrite. addClause(BlendedTermQuery.Builder topLevel, Term term, int docCount, float boost, TermStates states)protected voidMultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite. addClause(BooleanQuery.Builder topLevel, Term term, int docFreq, float boost, TermStates states)protected voidMultiTermQuery.TopTermsScoringBooleanQueryRewrite. addClause(BooleanQuery.Builder topLevel, Term term, int docCount, float boost, TermStates states)SynonymQuery.BuilderSynonymQuery.Builder. addTerm(Term term)Adds the providedtermas a synonym.SynonymQuery.BuilderSynonymQuery.Builder. addTerm(Term term, float boost)Adds the providedtermas a synonym, document frequencies of this term will be boosted byboost.voidQueryVisitor. consumeTerms(Query query, Term... terms)Called by leaf queries that match on specific termsTermStatisticsIndexSearcher. termStatistics(Term term, int docFreq, long totalTermFreq)ReturnsTermStatisticsfor a term.static AutomatonWildcardQuery. 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 static QueryVisitorQueryVisitor. termCollector(Set<Term> termSet)Builds aQueryVisitorinstance that collects all terms that may match a queryConstructors 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.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 mostmaxEditstoterm.FuzzyTermsEnum(Terms terms, Term term, int maxEdits, int prefixLength, boolean transpositions)Constructor for enumeration of all terms from specifiedreaderwhich share a prefix of lengthprefixLengthwithtermand which have at mostmaxEditsedits.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 withprefixusing 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, List<Term> terms) -
Uses of Term in org.apache.lucene.util
Methods in org.apache.lucene.util with parameters of type Term Modifier and Type Method Description protected QueryQueryBuilder. 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(String field, int state)Returns the list of terms that start at the provided state
-