Package | Description |
---|---|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.spans |
The calculus of spans.
|
org.apache.lucene.util |
Some utility classes.
|
org.apache.lucene.util.graph |
Utility classes for working with token streams as graphs.
|
Modifier and Type | Method and Description |
---|---|
void |
PrefixCodedTerms.Builder.add(Term term)
add a term
|
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 |
IndexWriter.deleteDocuments(Term... terms)
Deletes the document(s) containing any of the
terms.
|
int |
BaseCompositeReader.docFreq(Term term) |
abstract int |
IndexReader.docFreq(Term term)
Returns the number of documents containing the
term . |
int |
LeafReader.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. |
long |
BaseCompositeReader.totalTermFreq(Term term) |
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 |
IndexWriter.updateBinaryDocValue(Term term,
String field,
BytesRef value)
|
long |
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. |
long |
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.
|
long |
IndexWriter.updateDocValues(Term term,
Field... updates)
Updates documents' DocValues fields to the given values.
|
long |
IndexWriter.updateNumericDocValue(Term term,
String field,
long value)
|
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 |
RegexpQuery.getRegexp()
Returns the regexp of this query wrapped in a Term.
|
Term |
WildcardQuery.getTerm()
Returns the pattern term.
|
Term |
TermQuery.getTerm()
Returns the term of this query.
|
Term |
FuzzyQuery.getTerm()
Returns the pattern term.
|
Term[][] |
MultiPhraseQuery.getTermArrays()
Returns the arrays of arrays of terms in the multi-phrase.
|
Term[] |
PhraseQuery.getTerms()
Returns the list of terms in this phrase.
|
Term[] |
NGramPhraseQuery.getTerms()
Return the list of terms.
|
Modifier and Type | Method and Description |
---|---|
List<Term> |
SynonymQuery.getTerms() |
Modifier and Type | Method and Description |
---|---|
BlendedTermQuery.Builder |
BlendedTermQuery.Builder.add(Term term)
Add a new
Term to this builder, with a default boost of 1 . |
PhraseQuery.Builder |
PhraseQuery.Builder.add(Term term)
Adds a term to the end of the query phrase.
|
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.
|
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. |
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 |
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 |
FilterWeight.extractTerms(Set<Term> terms) |
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,
int maxEdits,
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 at most maxEdits edits. |
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 . |
SynonymQuery(Term... terms)
Creates a new SynonymQuery, matching any of the supplied terms.
|
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 | 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 |
---|---|
static Map<Term,TermContext> |
SpanQuery.getTermContexts(Collection<SpanWeight> weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
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 |
SpanTermQuery.SpanTermWeight.extractTermContexts(Map<Term,TermContext> contexts) |
abstract void |
SpanWeight.extractTermContexts(Map<Term,TermContext> contexts)
Collect all TermContexts used by this Weight
|
void |
SpanOrQuery.SpanOrWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanNearQuery.SpanNearWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanNotQuery.SpanNotWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanPositionCheckQuery.SpanPositionCheckWeight.extractTermContexts(Map<Term,TermContext> contexts) |
void |
SpanTermQuery.SpanTermWeight.extractTerms(Set<Term> terms) |
void |
SpanOrQuery.SpanOrWeight.extractTerms(Set<Term> terms) |
void |
SpanNearQuery.SpanNearWeight.extractTerms(Set<Term> terms) |
void |
SpanNotQuery.SpanNotWeight.extractTerms(Set<Term> terms) |
void |
SpanPositionCheckQuery.SpanPositionCheckWeight.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(Similarity.SimScorer scorer,
PostingsEnum postings,
Term term,
float positionsCost) |
Constructor and Description |
---|
SpanContainingWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight bigWeight,
SpanWeight littleWeight,
float boost) |
SpanNearWeight(List<SpanWeight> subWeights,
IndexSearcher searcher,
Map<Term,TermContext> terms,
float boost) |
SpanNotWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight includeWeight,
SpanWeight excludeWeight,
float boost) |
SpanOrWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
List<SpanWeight> subWeights,
float boost) |
SpanPositionCheckWeight(SpanWeight matchWeight,
IndexSearcher searcher,
Map<Term,TermContext> terms,
float boost) |
SpanTermWeight(TermContext termContext,
IndexSearcher searcher,
Map<Term,TermContext> terms,
float boost) |
SpanWeight(SpanQuery query,
IndexSearcher searcher,
Map<Term,TermContext> termContexts,
float boost)
Create a new SpanWeight
|
SpanWithinWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight bigWeight,
SpanWeight littleWeight,
float boost) |
Modifier and Type | Method and Description |
---|---|
protected Query |
QueryBuilder.newSynonymQuery(Term[] terms)
Builds a new SynonymQuery instance.
|
protected Query |
QueryBuilder.newTermQuery(Term term)
Builds a new TermQuery instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
QueryBuilder.add(BooleanQuery.Builder q,
List<Term> current,
BooleanClause.Occur operator) |
Modifier and Type | Method and Description |
---|---|
Term[] |
GraphTokenStreamFiniteStrings.getTerms(String field,
int state)
Returns the list of terms that start at the provided state
|
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.