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.queryParser A simple query parser implemented with JavaCC.org.apache.lucene.search Code to search indices.org.apache.lucene.search.function Programmatic control over documents scores.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. -
-
Uses of Term in org.apache.lucene.index
Methods in org.apache.lucene.index that return Term Modifier and Type Method Description Term
Term. createTerm(String text)
Optimized construction of new Terms by reusing same field as this Term - avoids field.intern() overheadTerm
FilterIndexReader.FilterTermEnum. term()
abstract Term
TermEnum. term()
Returns the current Term in the enumeration.Methods in org.apache.lucene.index with parameters of type Term Modifier and Type Method Description 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.int
IndexReader. deleteDocuments(Term term)
Deprecated.Write support will be removed in Lucene 4.0.void
IndexWriter. deleteDocuments(Term term)
Deletes the document(s) containingterm
.void
IndexWriter. deleteDocuments(Term... terms)
Deletes the document(s) containing any of the terms.int
FilterIndexReader. docFreq(Term t)
abstract int
IndexReader. docFreq(Term t)
Returns the number of documents containing the termt
.int
MultiReader. docFreq(Term t)
int
ParallelReader. docFreq(Term term)
int
SegmentReader. docFreq(Term t)
abstract PayloadProcessorProvider.PayloadProcessor
PayloadProcessorProvider.ReaderPayloadProcessor. getProcessor(Term term)
Returns aPayloadProcessorProvider.PayloadProcessor
for the given term.TermDocs
SegmentReader. rawTermDocs(Term term)
Expert: returns an enumeration of the documents that containterm
, including deleted documents (which are normally filtered out).void
AbstractAllTermDocs. seek(Term term)
void
FilterIndexReader.FilterTermDocs. seek(Term term)
void
MultipleTermPositions. seek(Term arg0)
Not implemented.void
TermDocs. seek(Term term)
Sets this to the data for a term.TermDocs
FilterIndexReader. termDocs(Term term)
TermDocs
IndexReader. termDocs(Term term)
Returns an enumeration of all the documents which containterm
.TermDocs
MultiReader. termDocs(Term term)
TermDocs
ParallelReader. termDocs(Term term)
TermDocs
SegmentReader. termDocs(Term term)
TermPositions
IndexReader. termPositions(Term term)
Returns an enumeration of all the documents which containterm
.TermEnum
FilterIndexReader. terms(Term t)
abstract TermEnum
IndexReader. terms(Term t)
Returns an enumeration of all terms starting at a given term.TermEnum
MultiReader. terms(Term term)
TermEnum
ParallelReader. terms(Term term)
TermEnum
SegmentReader. terms(Term t)
void
IndexWriter. updateDocument(Term term, Document doc)
Updates a document by first deleting the document(s) containingterm
and then adding the new document.void
IndexWriter. updateDocument(Term term, Document doc, Analyzer analyzer)
Updates a document by first deleting the document(s) containingterm
and then adding the new document.void
IndexWriter. updateDocuments(Term delTerm, Collection<Document> 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.void
IndexWriter. updateDocuments(Term delTerm, Collection<Document> 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.Constructors in org.apache.lucene.index with parameters of type Term Constructor Description MultipleTermPositions(IndexReader indexReader, Term[] terms)
Creates a newMultipleTermPositions
instance. -
Uses of Term in org.apache.lucene.queryParser
Methods in org.apache.lucene.queryParser with parameters of type Term Modifier and Type Method Description protected Query
QueryParser. newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Builds a new FuzzyQuery instanceprotected Query
QueryParser. newPrefixQuery(Term prefix)
Builds a new PrefixQuery instanceprotected Query
QueryParser. newTermQuery(Term term)
Builds a new TermQuery instanceprotected Query
QueryParser. newWildcardQuery(Term t)
Builds a new WildcardQuery instance -
Uses of Term in org.apache.lucene.search
Fields in org.apache.lucene.search declared as Term Modifier and Type Field Description protected Term
FilteredTermEnum. currentTerm
the current termprotected Term
FuzzyQuery. term
protected Term
WildcardQuery. term
Methods in org.apache.lucene.search that return Term Modifier and Type Method Description Term
PrefixFilter. getPrefix()
Term
PrefixQuery. getPrefix()
Returns the prefix of this query.protected Term
PrefixTermEnum. getPrefixTerm()
Term
FuzzyQuery. getTerm()
Returns the pattern term.Term
TermQuery. getTerm()
Returns the term of this query.Term
WildcardQuery. getTerm()
Returns the pattern term.Term[]
PhraseQuery. getTerms()
Returns the set of terms in this phrase.Term
FilteredTermEnum. term()
Returns the current Term in the enumeration.Methods in org.apache.lucene.search with parameters of type Term Modifier and Type Method Description void
MultiPhraseQuery. add(Term term)
Add a single term at the next position in the phrase.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.void
PhraseQuery. add(Term term)
Adds a term to the end of the query phrase.void
PhraseQuery. add(Term term, int position)
Adds a term to the end of the query phrase.protected void
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite. addClause(BooleanQuery topLevel, Term term, float boost)
protected void
MultiTermQuery.TopTermsScoringBooleanQueryRewrite. addClause(BooleanQuery topLevel, Term term, float boost)
long
NRTManager.TrackingIndexWriter. deleteDocuments(Term t)
long
NRTManager.TrackingIndexWriter. deleteDocuments(Term... terms)
int
IndexSearcher. docFreq(Term term)
Returns total docFreq for this term.int
MultiSearcher. docFreq(Term term)
Deprecated.int
ParallelMultiSearcher. docFreq(Term term)
Deprecated.Executes eachSearchable
's docFreq() in its own thread and waits for each search to complete and merge the results back together.int
Searchable. docFreq(Term term)
Deprecated.Expert: Returns the number of documents containingterm
.abstract int
Searcher. docFreq(Term term)
Deprecated.int[]
Searchable. docFreqs(Term[] terms)
Deprecated.Expert: For each term in the terms array, calculates the number of documents containingterm
.int[]
Searcher. docFreqs(Term[] terms)
Deprecated.Explanation.IDFExplanation
Similarity. idfExplain(Term term, Searcher searcher)
This method forwards toSimilarity.idfExplain(Term,Searcher,int)
by passingsearcher.docFreq(term)
as the docFreq.Explanation.IDFExplanation
Similarity. idfExplain(Term term, Searcher searcher, int docFreq)
Computes a score factor for a simple term and returns an explanation for that score factor.protected abstract boolean
FilteredTermEnum. termCompare(Term term)
Equality compare on the termprotected boolean
FuzzyTermEnum. termCompare(Term term)
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.protected boolean
PrefixTermEnum. termCompare(Term term)
protected boolean
SingleTermEnum. termCompare(Term term)
protected boolean
TermRangeTermEnum. termCompare(Term term)
protected boolean
WildcardTermEnum. termCompare(Term term)
long
NRTManager.TrackingIndexWriter. updateDocument(Term t, Document d)
long
NRTManager.TrackingIndexWriter. updateDocument(Term t, Document d, Analyzer a)
long
NRTManager.TrackingIndexWriter. updateDocuments(Term t, Collection<Document> docs)
long
NRTManager.TrackingIndexWriter. updateDocuments(Term t, Collection<Document> docs, Analyzer a)
Method parameters in org.apache.lucene.search with type arguments of type Term Modifier and Type Method Description void
BooleanQuery. extractTerms(Set<Term> terms)
void
ConstantScoreQuery. extractTerms(Set<Term> terms)
void
DisjunctionMaxQuery. extractTerms(Set<Term> terms)
void
FilteredQuery. extractTerms(Set<Term> terms)
void
MatchAllDocsQuery. extractTerms(Set<Term> terms)
void
MultiPhraseQuery. extractTerms(Set<Term> terms)
void
PhraseQuery. extractTerms(Set<Term> queryTerms)
void
Query. extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.void
TermQuery. extractTerms(Set<Term> terms)
Explanation.IDFExplanation
Similarity. idfExplain(Collection<Term> terms, Searcher searcher)
Computes a score factor for a phrase.Constructors in org.apache.lucene.search with parameters of type Term Constructor Description FuzzyQuery(Term term)
FuzzyQuery(Term term, float minimumSimilarity)
FuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
FuzzyQuery(Term term, float minimumSimilarity, int prefixLength, int maxExpansions)
Create a new FuzzyQuery that will match terms with a similarity of at leastminimumSimilarity
toterm
.FuzzyTermEnum(IndexReader reader, Term term)
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity)
Creates a FuzzyTermEnum with an empty prefix.FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength)
Constructor for enumeration of all terms from specifiedreader
which share a prefix of lengthprefixLength
withterm
and which have a fuzzy similarity >minSimilarity
.PrefixFilter(Term prefix)
PrefixQuery(Term prefix)
Constructs a query for terms starting withprefix
.PrefixTermEnum(IndexReader reader, Term prefix)
SingleTermEnum(IndexReader reader, Term singleTerm)
Creates a newSingleTermEnum
.TermQuery(Term t)
Constructs a query for the termt
.WildcardQuery(Term term)
WildcardTermEnum(IndexReader reader, Term term)
Creates a newWildcardTermEnum
. -
Uses of Term in org.apache.lucene.search.function
Method parameters in org.apache.lucene.search.function with type arguments of type Term Modifier and Type Method Description void
CustomScoreQuery. extractTerms(Set<Term> terms)
void
ValueSourceQuery. extractTerms(Set<Term> terms)
-
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 Term
SpanTermQuery. term
protected Term
TermSpans. term
Fields in org.apache.lucene.search.spans with type parameters of type Term Modifier and Type Field Description protected Set<Term>
SpanWeight. terms
Methods in org.apache.lucene.search.spans that return Term Modifier and Type Method Description Term
SpanTermQuery. 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 void
FieldMaskingSpanQuery. extractTerms(Set<Term> terms)
void
SpanNearQuery. extractTerms(Set<Term> terms)
void
SpanNotQuery. extractTerms(Set<Term> terms)
void
SpanOrQuery. extractTerms(Set<Term> terms)
void
SpanPositionCheckQuery. extractTerms(Set<Term> terms)
void
SpanTermQuery. extractTerms(Set<Term> terms)
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(TermPositions positions, Term term)
-