Package | Description |
---|---|
org.apache.lucene.index |
Code to maintain and access indices.
|
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.
|
org.apache.lucene.util |
Some utility classes.
|
Modifier and Type | Class and Description |
---|---|
class |
FilterIndexReader
A
FilterIndexReader contains another IndexReader, which it
uses as its basic source of data, possibly transforming the data along the
way or providing additional functionality. |
class |
MultiReader
An IndexReader which reads multiple indexes, appending their content.
|
class |
ParallelReader
An IndexReader which reads multiple, parallel indexes.
|
class |
SegmentReader
NOTE: This API is new and still experimental
(subject to change suddenly in the next release)
|
Modifier and Type | Field and Description |
---|---|
protected IndexReader |
FilterIndexReader.in |
protected IndexReader |
IndexModifier.indexReader
Deprecated.
|
protected IndexReader[] |
MultiReader.subReaders |
Modifier and Type | Method and Description |
---|---|
IndexReader |
SegmentReader.clone(boolean openReadOnly) |
IndexReader |
IndexReader.clone(boolean openReadOnly)
Clones the IndexReader and optionally changes readOnly.
|
protected IndexReader |
ParallelReader.doReopen(boolean doClone) |
protected IndexReader |
MultiReader.doReopen(boolean doClone)
If clone is true then we clone each of the subreaders
|
IndexReader |
IndexWriter.getReader()
Expert: returns a readonly reader, covering all
committed as well as un-committed changes to the index.
|
IndexReader |
IndexWriter.getReader(int termInfosIndexDivisor)
Expert: like
IndexWriter.getReader() , except you can
specify which termInfosIndexDivisor should be used for
any newly opened readers. |
IndexReader[] |
MultiReader.getSequentialSubReaders() |
IndexReader[] |
IndexReader.getSequentialSubReaders()
Expert: returns the sequential sub readers that this
reader is logically composed of.
|
IndexReader[] |
FilterIndexReader.getSequentialSubReaders() |
static IndexReader |
IndexReader.open(Directory directory)
Deprecated.
Use
open(Directory, boolean) instead
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(Directory directory,
boolean readOnly)
Returns an IndexReader reading the index in the given
Directory.
|
static IndexReader |
IndexReader.open(Directory directory,
IndexDeletionPolicy deletionPolicy)
Deprecated.
Use
open(Directory, IndexDeletionPolicy, boolean) instead.
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(Directory directory,
IndexDeletionPolicy deletionPolicy,
boolean readOnly)
Expert: returns an IndexReader reading the index in
the given Directory, with a custom
IndexDeletionPolicy . |
static IndexReader |
IndexReader.open(Directory directory,
IndexDeletionPolicy deletionPolicy,
boolean readOnly,
int termInfosIndexDivisor)
Expert: returns an IndexReader reading the index in
the given Directory, with a custom
IndexDeletionPolicy . |
static IndexReader |
IndexReader.open(java.io.File path)
Deprecated.
Use
open(Directory, boolean) instead.
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(java.io.File path,
boolean readOnly)
Deprecated.
Use
open(Directory, boolean) instead.
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(IndexCommit commit)
Deprecated.
Use
open(IndexCommit, boolean) instead.
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(IndexCommit commit,
boolean readOnly)
Expert: returns an IndexReader reading the index in the given
IndexCommit . |
static IndexReader |
IndexReader.open(IndexCommit commit,
IndexDeletionPolicy deletionPolicy)
Deprecated.
Use
open(IndexCommit, IndexDeletionPolicy, boolean) instead.
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(IndexCommit commit,
IndexDeletionPolicy deletionPolicy,
boolean readOnly)
Expert: returns an IndexReader reading the index in
the given Directory, using a specific commit and with
a custom
IndexDeletionPolicy . |
static IndexReader |
IndexReader.open(IndexCommit commit,
IndexDeletionPolicy deletionPolicy,
boolean readOnly,
int termInfosIndexDivisor)
Expert: returns an IndexReader reading the index in
the given Directory, using a specific commit and with
a custom
IndexDeletionPolicy . |
static IndexReader |
IndexReader.open(java.lang.String path)
Deprecated.
Use
open(Directory, boolean) instead.
This method will be removed in the 3.0 release. |
static IndexReader |
IndexReader.open(java.lang.String path,
boolean readOnly)
Deprecated.
Use
open(Directory, boolean) instead.
This method will be removed in the 3.0 release. |
IndexReader |
ParallelReader.reopen()
Tries to reopen the subreaders.
|
IndexReader |
MultiReader.reopen()
Tries to reopen the subreaders.
|
IndexReader |
IndexReader.reopen()
Refreshes an IndexReader if the index has changed since this instance
was (re)opened.
|
IndexReader |
IndexReader.reopen(boolean openReadOnly)
Just like
reopen() , except you can change the
readOnly of the original reader. |
IndexReader |
IndexReader.reopen(IndexCommit commit)
Expert: reopen this reader on a specific commit point.
|
Modifier and Type | Method and Description |
---|---|
void |
ParallelReader.add(IndexReader reader)
Add an IndexReader.
|
void |
ParallelReader.add(IndexReader reader,
boolean ignoreStoredFields)
Add an IndexReader whose stored fields will not be returned.
|
void |
IndexWriter.addIndexes(IndexReader[] readers)
Merges the provided indexes into this index.
|
abstract void |
IndexWriter.IndexReaderWarmer.warm(IndexReader reader) |
Constructor and Description |
---|
FilterIndexReader(IndexReader in)
Construct a FilterIndexReader based on the specified base reader.
|
MultipleTermPositions(IndexReader indexReader,
Term[] terms)
Creates a new
MultipleTermPositions instance. |
MultiReader(IndexReader[] subReaders)
Construct a MultiReader aggregating the named set of (sub)readers.
|
MultiReader(IndexReader[] subReaders,
boolean closeSubReaders)
Construct a MultiReader aggregating the named set of (sub)readers.
|
Modifier and Type | Method and Description |
---|---|
IndexReader |
IndexSearcher.getIndexReader()
Return the
IndexReader this searches. |
Modifier and Type | Method and Description |
---|---|
java.util.BitSet |
MultiTermQueryWrapperFilter.bits(IndexReader reader)
Deprecated.
Use
MultiTermQueryWrapperFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
CachingWrapperFilter.bits(IndexReader reader)
Deprecated.
Use
CachingWrapperFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
QueryWrapperFilter.bits(IndexReader reader)
Deprecated.
Use
QueryWrapperFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
CachingSpanFilter.bits(IndexReader reader)
Deprecated.
Use
CachingSpanFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
Filter.bits(IndexReader reader)
Deprecated.
Use
Filter.getDocIdSet(IndexReader) instead. |
abstract SpanFilterResult |
SpanFilter.bitSpans(IndexReader reader)
Returns a SpanFilterResult with true for documents which should be permitted in
search results, and false for those that should not and Spans for where the true docs match.
|
SpanFilterResult |
SpanQueryFilter.bitSpans(IndexReader reader) |
SpanFilterResult |
CachingSpanFilter.bitSpans(IndexReader reader) |
protected DocIdSet |
CachingWrapperFilter.docIdSetToCache(DocIdSet docIdSet,
IndexReader reader)
Provide the DocIdSet to be cached, using the DocIdSet provided
by the wrapped Filter.
|
Explanation |
ConstantScoreQuery.ConstantWeight.explain(IndexReader reader,
int doc) |
Explanation |
DisjunctionMaxQuery.DisjunctionMaxWeight.explain(IndexReader reader,
int doc) |
Explanation |
BooleanQuery.BooleanWeight.explain(IndexReader reader,
int doc) |
abstract Explanation |
Weight.explain(IndexReader reader,
int doc)
An explanation of the score computation for the named document.
|
protected void |
IndexSearcher.gatherSubReaders(java.util.List allSubReaders,
IndexReader r) |
java.lang.Object |
FieldCache.getAuto(IndexReader reader,
java.lang.String field)
Deprecated.
Please specify the exact type, instead.
Especially, guessing does not work with the new
NumericField type. |
byte[] |
FieldCache.getBytes(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in
field as a single byte and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
byte[] |
FieldCache.getBytes(IndexReader reader,
java.lang.String field,
FieldCache.ByteParser parser)
Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in
field as bytes and returns an array of
size reader.maxDoc() of the value each document has in the
given field. |
java.lang.Comparable[] |
FieldCache.getCustom(IndexReader reader,
java.lang.String field,
SortComparator comparator)
Deprecated.
Please implement
FieldComparatorSource directly, instead. |
DocIdSet |
MultiTermQueryWrapperFilter.getDocIdSet(IndexReader reader)
Returns a DocIdSet with documents that should be
permitted in search results.
|
DocIdSet |
CachingWrapperFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
QueryWrapperFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
SpanQueryFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
CachingSpanFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
Filter.getDocIdSet(IndexReader reader)
Creates a
DocIdSet enumerating the documents that should be
permitted in search results. |
DocIdSet |
FieldCacheTermsFilter.getDocIdSet(IndexReader reader) |
abstract DocIdSet |
FieldCacheRangeFilter.getDocIdSet(IndexReader reader)
This method is implemented for each data type
|
double[] |
FieldCache.getDoubles(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in
field as integers and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
double[] |
ExtendedFieldCache.getDoubles(IndexReader reader,
java.lang.String field,
ExtendedFieldCache.DoubleParser parser)
Deprecated.
Will be removed in 3.0, this is for binary compatibility only
|
double[] |
FieldCache.getDoubles(IndexReader reader,
java.lang.String field,
FieldCache.DoubleParser parser)
Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in
field as doubles and returns an array of
size reader.maxDoc() of the value each document has in the
given field. |
protected FilteredTermEnum |
TermRangeQuery.getEnum(IndexReader reader) |
protected FilteredTermEnum |
WildcardQuery.getEnum(IndexReader reader) |
protected abstract FilteredTermEnum |
MultiTermQuery.getEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.
|
protected FilteredTermEnum |
NumericRangeQuery.getEnum(IndexReader reader) |
protected FilteredTermEnum |
PrefixQuery.getEnum(IndexReader reader) |
protected FilteredTermEnum |
FuzzyQuery.getEnum(IndexReader reader) |
float[] |
FieldCache.getFloats(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in
field as floats and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
float[] |
FieldCache.getFloats(IndexReader reader,
java.lang.String field,
FieldCache.FloatParser parser)
Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in
field as floats and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
int[] |
FieldCache.getInts(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in
field as integers and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
int[] |
FieldCache.getInts(IndexReader reader,
java.lang.String field,
FieldCache.IntParser parser)
Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in
field as integers and returns an array of
size reader.maxDoc() of the value each document has in the
given field. |
long[] |
FieldCache.getLongs(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in
field as longs and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
long[] |
ExtendedFieldCache.getLongs(IndexReader reader,
java.lang.String field,
ExtendedFieldCache.LongParser parser)
Deprecated.
Will be removed in 3.0, this is for binary compatibility only
|
long[] |
FieldCache.getLongs(IndexReader reader,
java.lang.String field,
FieldCache.LongParser parser)
Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in
field as longs and returns an array of
size reader.maxDoc() of the value each document has in the
given field. |
short[] |
FieldCache.getShorts(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in
field as shorts and returns an array
of size reader.maxDoc() of the value each document
has in the given field. |
short[] |
FieldCache.getShorts(IndexReader reader,
java.lang.String field,
FieldCache.ShortParser parser)
Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in
field as shorts and returns an array of
size reader.maxDoc() of the value each document has in the
given field. |
FieldCache.StringIndex |
FieldCache.getStringIndex(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none
is found reads the term values in
field and returns
an array of them in natural order, along with an array telling
which element in the term array each document uses. |
java.lang.String[] |
FieldCache.getStrings(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in
field and returns an array
of size reader.maxDoc() containing the value each document
has in the given field. |
ScoreDocComparator |
SortComparatorSource.newComparator(IndexReader reader,
java.lang.String fieldname)
Deprecated.
Creates a comparator for the field in the given index.
|
ScoreDocComparator |
SortComparator.newComparator(IndexReader reader,
java.lang.String fieldname)
Deprecated.
|
void |
FieldCache.purge(IndexReader r)
Expert: drops all cache entries associated with this
reader.
|
Query |
MultiPhraseQuery.rewrite(IndexReader reader) |
Query |
WildcardQuery.rewrite(IndexReader reader) |
Query |
MultiTermQuery.rewrite(IndexReader reader) |
Query |
FuzzyQuery.rewrite(IndexReader reader) |
Query |
ConstantScoreQuery.rewrite(IndexReader reader) |
Query |
FilteredQuery.rewrite(IndexReader reader)
Rewrites the wrapped query.
|
Query |
DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
|
Query |
BooleanQuery.rewrite(IndexReader reader) |
Query |
RangeQuery.rewrite(IndexReader reader)
Deprecated.
|
Query |
Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
abstract Query |
MultiTermQuery.RewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
MultiTermQuery.ConstantScoreAutoRewrite.rewrite(IndexReader reader,
MultiTermQuery query) |
Scorer |
ConstantScoreQuery.ConstantWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
Scorer |
DisjunctionMaxQuery.DisjunctionMaxWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
Scorer |
BooleanQuery.BooleanWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
abstract Scorer |
Weight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer)
Returns a
Scorer which scores documents in/out-of order according
to scoreDocsInOrder . |
void |
PositiveScoresOnlyCollector.setNextReader(IndexReader reader,
int docBase) |
abstract void |
FieldComparator.setNextReader(IndexReader reader,
int docBase)
Set a new Reader.
|
void |
FieldComparator.ByteComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.DocComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.DoubleComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.FloatComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.IntComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.LongComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.RelevanceComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.ShortComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.StringComparatorLocale.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.StringOrdValComparator.setNextReader(IndexReader reader,
int docBase) |
void |
FieldComparator.StringValComparator.setNextReader(IndexReader reader,
int docBase) |
void |
TopScoreDocCollector.setNextReader(IndexReader reader,
int base) |
void |
TimeLimitingCollector.setNextReader(IndexReader reader,
int base) |
abstract void |
Collector.setNextReader(IndexReader reader,
int docBase)
Called before collecting from each IndexReader.
|
void |
HitCollectorWrapper.setNextReader(IndexReader reader,
int docBase)
Deprecated.
|
Constructor and Description |
---|
ConstantScorer(Similarity similarity,
IndexReader reader,
Weight w) |
FieldSortedHitQueue(IndexReader reader,
SortField[] fields,
int size)
Deprecated.
Creates a hit queue sorted by the given list of fields.
|
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 specified
reader which share a prefix of
length prefixLength with term and which have a fuzzy similarity >
minSimilarity . |
IndexSearcher(IndexReader r)
Creates a searcher searching the provided index.
|
PrefixTermEnum(IndexReader reader,
Term prefix) |
TermRangeTermEnum(IndexReader reader,
java.lang.String field,
java.lang.String lowerTermText,
java.lang.String upperTermText,
boolean includeLower,
boolean includeUpper,
java.text.Collator collator)
Enumerates all terms greater/equal than
lowerTerm
but less/equal than upperTerm . |
TopFieldDocCollector(IndexReader reader,
Sort sort,
int numHits)
Deprecated.
Construct to collect a given number of hits.
|
WildcardTermEnum(IndexReader reader,
Term term)
Creates a new
WildcardTermEnum . |
Modifier and Type | Field and Description |
---|---|
protected IndexReader |
CustomScoreProvider.reader |
Modifier and Type | Method and Description |
---|---|
abstract DocValues |
FieldCacheSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader)
Return cached DocValues for input field and reader.
|
DocValues |
FloatFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
DocValues |
ShortFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
DocValues |
ByteFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
DocValues |
IntFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
protected CustomScoreProvider |
CustomScoreQuery.getCustomScoreProvider(IndexReader reader)
Returns a
CustomScoreProvider that calculates the custom scores
for the given IndexReader . |
DocValues |
ReverseOrdFieldSource.getValues(IndexReader reader) |
DocValues |
FieldCacheSource.getValues(IndexReader reader) |
DocValues |
MultiValueSource.getValues(IndexReader reader)
Deprecated.
|
abstract DocValues |
ValueSource.getValues(IndexReader reader)
Return the DocValues used by the function query.
|
DocValues |
OrdFieldSource.getValues(IndexReader reader) |
Query |
CustomScoreQuery.rewrite(IndexReader reader) |
Query |
ValueSourceQuery.rewrite(IndexReader reader) |
Constructor and Description |
---|
CustomScoreProvider(IndexReader reader)
Creates a new instance of the provider class for the given
IndexReader . |
Modifier and Type | Method and Description |
---|---|
Scorer |
PayloadNearQuery.PayloadNearSpanWeight.scorer(IndexReader reader) |
Scorer |
BoostingTermQuery.BoostingTermWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
Scorer |
PayloadNearQuery.PayloadNearSpanWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
Scorer |
PayloadTermQuery.PayloadTermWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
Constructor and Description |
---|
PayloadSpanUtil(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
Explanation |
SpanWeight.explain(IndexReader reader,
int doc) |
Spans |
SpanTermQuery.getSpans(IndexReader reader) |
abstract Spans |
SpanQuery.getSpans(IndexReader reader)
Expert: Returns the matches for this query in an index.
|
Spans |
SpanOrQuery.getSpans(IndexReader reader) |
Spans |
SpanNotQuery.getSpans(IndexReader reader) |
Spans |
FieldMaskingSpanQuery.getSpans(IndexReader reader) |
Spans |
SpanNearQuery.getSpans(IndexReader reader) |
Spans |
SpanFirstQuery.getSpans(IndexReader reader) |
Query |
SpanOrQuery.rewrite(IndexReader reader) |
Query |
SpanNotQuery.rewrite(IndexReader reader) |
Query |
FieldMaskingSpanQuery.rewrite(IndexReader reader) |
Query |
SpanNearQuery.rewrite(IndexReader reader) |
Query |
SpanFirstQuery.rewrite(IndexReader reader) |
Scorer |
SpanWeight.scorer(IndexReader reader,
boolean scoreDocsInOrder,
boolean topScorer) |
Constructor and Description |
---|
NearSpansOrdered(SpanNearQuery spanNearQuery,
IndexReader reader) |
NearSpansOrdered(SpanNearQuery spanNearQuery,
IndexReader reader,
boolean collectPayloads) |
NearSpansUnordered(SpanNearQuery query,
IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
static IndexReader |
ReaderUtil.subReader(IndexReader reader,
int subIndex)
Returns sub-reader subIndex from reader.
|
static IndexReader |
ReaderUtil.subReader(int doc,
IndexReader reader)
Returns sub IndexReader that contains the given document id.
|
Modifier and Type | Method and Description |
---|---|
static void |
ReaderUtil.gatherSubReaders(java.util.List allSubReaders,
IndexReader reader)
Gathers sub-readers from reader into a List.
|
static IndexReader |
ReaderUtil.subReader(IndexReader reader,
int subIndex)
Returns sub-reader subIndex from reader.
|
static IndexReader |
ReaderUtil.subReader(int doc,
IndexReader reader)
Returns sub IndexReader that contains the given document id.
|
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.