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.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.util Some utility classes. -
-
Uses of Term in org.apache.lucene.index
Methods in org.apache.lucene.index with parameters of type Term Modifier and Type Method Description static TermContextTermContext. build(IndexReaderContext context, Term term)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.voidIndexWriter. deleteDocuments(Term term)Deletes the document(s) containingterm.voidIndexWriter. deleteDocuments(Term... terms)Deletes the document(s) containing any of the terms.longTrackingIndexWriter. deleteDocuments(Term t)CallsIndexWriter.deleteDocuments(Term)and returns the generation that reflects this change.longTrackingIndexWriter. deleteDocuments(Term... terms)CallsIndexWriter.deleteDocuments(Term...)and returns the generation that reflects this change.intAtomicReader. docFreq(Term term)intBaseCompositeReader. docFreq(Term term)abstract intIndexReader. docFreq(Term term)Returns the number of documents containing theterm.DocsEnumAtomicReader. termDocsEnum(Term term)ReturnsDocsEnumfor the specified term.DocsAndPositionsEnumAtomicReader. termPositionsEnum(Term term)ReturnsDocsAndPositionsEnumfor the specified term.longAtomicReader. totalTermFreq(Term term)Returns the number of documents containing the termt.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).voidIndexWriter. updateDocument(Term term, Iterable<? extends IndexableField> doc)Updates a document by first deleting the document(s) containingtermand then adding the new document.voidIndexWriter. updateDocument(Term term, Iterable<? extends IndexableField> doc, Analyzer analyzer)Updates a document by first deleting the document(s) containingtermand then adding the new document.longTrackingIndexWriter. updateDocument(Term t, Iterable<? extends IndexableField> d)CallsIndexWriter.updateDocument(Term,Iterable)and returns the generation that reflects this change.longTrackingIndexWriter. updateDocument(Term t, Iterable<? extends IndexableField> d, Analyzer a)CallsIndexWriter.updateDocument(Term,Iterable,Analyzer)and returns the generation that reflects this change.voidIndexWriter. 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.voidIndexWriter. updateDocuments(Term delTerm, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer)Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.longTrackingIndexWriter. updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs)CallsIndexWriter.updateDocuments(Term,Iterable)and returns the generation that reflects this change.longTrackingIndexWriter. updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a)CallsIndexWriter.updateDocuments(Term,Iterable,Analyzer)and returns the generation that reflects this change.voidIndexWriter. updateNumericDocValue(Term term, String field, Long value)Updates a document's NumericDocValue forfieldto the givenvalue. -
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 TermPrefixFilter. getPrefix()TermPrefixQuery. getPrefix()Returns the prefix of this query.TermFuzzyQuery. getTerm()Returns the pattern term.TermTermQuery. getTerm()Returns the term of this query.TermWildcardQuery. getTerm()Returns the pattern term.Term[]PhraseQuery. getTerms()Returns the set of terms in this phrase.Methods in org.apache.lucene.search with parameters of type Term Modifier and Type Method Description voidMultiPhraseQuery. add(Term term)Add a single term at the next position in the phrase.voidMultiPhraseQuery. add(Term[] terms)Add multiple terms at the next position in the phrase.voidMultiPhraseQuery. add(Term[] terms, int position)Allows to specify the relative position of terms within the phrase.voidPhraseQuery. add(Term term)Adds a term to the end of the query phrase.voidPhraseQuery. add(Term term, int position)Adds a term to the end of the query phrase.protected voidMultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite. addClause(BooleanQuery topLevel, Term term, int docFreq, float boost, TermContext states)protected voidMultiTermQuery.TopTermsScoringBooleanQueryRewrite. addClause(BooleanQuery topLevel, Term term, int docCount, float boost, TermContext states)TermStatisticsIndexSearcher. termStatistics(Term term, TermContext context)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 voidBooleanQuery. extractTerms(Set<Term> terms)voidConstantScoreQuery. extractTerms(Set<Term> terms)voidDisjunctionMaxQuery. extractTerms(Set<Term> terms)voidFilteredQuery. extractTerms(Set<Term> terms)voidMatchAllDocsQuery. extractTerms(Set<Term> terms)voidMultiPhraseQuery. extractTerms(Set<Term> terms)voidPhraseQuery. extractTerms(Set<Term> queryTerms)voidQuery. extractTerms(Set<Term> terms)Expert: adds all terms occurring in this query to the terms set.voidTermQuery. extractTerms(Set<Term> terms)Constructors in org.apache.lucene.search with parameters of type Term Constructor Description AutomatonQuery(Term term, Automaton automaton)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)Create a new FuzzyQuery that will match terms with an edit distance of at mostmaxEditstoterm.FuzzyTermsEnum(Terms terms, AttributeSource atts, Term term, float minSimilarity, int prefixLength, boolean transpositions)Constructor for enumeration of all terms from specifiedreaderwhich share a prefix of lengthprefixLengthwithtermand which have a fuzzy similarity >minSimilarity.PrefixFilter(Term prefix)PrefixQuery(Term prefix)Constructs a query for terms starting withprefix.RegexpQuery(Term term)Constructs a query for terms matchingterm.RegexpQuery(Term term, int flags)Constructs a query for terms matchingterm.RegexpQuery(Term term, int flags, AutomatonProvider provider)Constructs a query for terms matchingterm.TermQuery(Term t)Constructs a query for the termt.TermQuery(Term t, int docFreq)Expert: constructs a TermQuery that will use the provided docFreq instead of looking up the docFreq against the searcher.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 matchingterm. -
Uses of Term in org.apache.lucene.search.payloads
Constructors in org.apache.lucene.search.payloads with parameters of type Term Constructor Description PayloadTermQuery(Term term, PayloadFunction function)PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore) -
Uses of Term in org.apache.lucene.search.spans
Fields in org.apache.lucene.search.spans declared as Term Modifier and Type Field Description protected TermSpanTermQuery. termprotected TermTermSpans. termFields in org.apache.lucene.search.spans with type parameters of type Term Modifier and Type Field Description protected Map<Term,TermContext>SpanWeight. termContextsMethods in org.apache.lucene.search.spans that return Term Modifier and Type Method Description TermSpanTermQuery. getTerm()Return the term whose spans are matched.Method parameters in org.apache.lucene.search.spans with type arguments of type Term Modifier and Type Method Description voidFieldMaskingSpanQuery. extractTerms(Set<Term> terms)voidSpanNearQuery. extractTerms(Set<Term> terms)voidSpanNotQuery. extractTerms(Set<Term> terms)voidSpanOrQuery. extractTerms(Set<Term> terms)voidSpanPositionCheckQuery. extractTerms(Set<Term> terms)voidSpanTermQuery. extractTerms(Set<Term> terms)SpansFieldMaskingSpanQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)SpansSpanMultiTermQueryWrapper. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)SpansSpanNearQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)SpansSpanNotQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)SpansSpanOrQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)SpansSpanPositionCheckQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)abstract SpansSpanQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)Expert: Returns the matches for this query in an index.SpansSpanTermQuery. getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)Constructors in org.apache.lucene.search.spans with parameters of type Term Constructor Description SpanTermQuery(Term term)Construct a SpanTermQuery matching the named term's spans.TermSpans(DocsAndPositionsEnum postings, Term term)Constructor parameters in org.apache.lucene.search.spans with type arguments of type Term Constructor Description NearSpansOrdered(SpanNearQuery spanNearQuery, AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)NearSpansOrdered(SpanNearQuery spanNearQuery, AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts, boolean collectPayloads)NearSpansUnordered(SpanNearQuery query, AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts)PositionCheckSpan(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts) -
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)Builds a new TermQuery instance.
-