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.
|
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.
|
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 |
---|---|
static IndexReader |
IndexReader.open(Directory directory)
Returns a read/write IndexReader reading the index in
the given Directory.
|
static IndexReader |
IndexReader.open(Directory directory,
boolean readOnly)
Returns a read/write or read only IndexReader reading the index in the given Directory.
|
static IndexReader |
IndexReader.open(Directory directory,
IndexDeletionPolicy deletionPolicy)
Expert: returns a read/write IndexReader reading the index in the given
Directory, with a custom
IndexDeletionPolicy . |
static IndexReader |
IndexReader.open(Directory directory,
IndexDeletionPolicy deletionPolicy,
boolean readOnly)
Expert: returns a read/write or read only IndexReader reading the index in the given
Directory, with a custom
IndexDeletionPolicy . |
static IndexReader |
IndexReader.open(java.io.File path)
Returns a read/write IndexReader reading the index in an FSDirectory in the named
path.
|
static IndexReader |
IndexReader.open(IndexCommit commit)
Expert: returns a read/write IndexReader reading the index in the given
IndexCommit . |
static IndexReader |
IndexReader.open(IndexCommit commit,
IndexDeletionPolicy deletionPolicy)
Expert: returns a read/write 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)
Expert: returns a read/write or read only 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)
Returns a read/write IndexReader reading the index in an FSDirectory in the named
path.
|
IndexReader |
IndexReader.reopen()
Refreshes an IndexReader if the index has changed since this instance
was (re)opened.
|
IndexReader |
ParallelReader.reopen()
Tries to reopen the subreaders.
|
IndexReader |
MultiReader.reopen()
Tries to reopen the subreaders.
|
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.
|
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 |
RangeFilter.bits(IndexReader reader)
Deprecated.
Use
RangeFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
PrefixFilter.bits(IndexReader reader)
Deprecated.
Use
PrefixFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
QueryWrapperFilter.bits(IndexReader reader)
Deprecated.
Use
QueryWrapperFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
Filter.bits(IndexReader reader)
Deprecated.
Use
Filter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
CachingWrapperFilter.bits(IndexReader reader)
Deprecated.
Use
CachingWrapperFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
RemoteCachingWrapperFilter.bits(IndexReader reader)
Deprecated.
Use
RemoteCachingWrapperFilter.getDocIdSet(IndexReader) instead. |
java.util.BitSet |
CachingSpanFilter.bits(IndexReader reader)
Deprecated.
Use
CachingSpanFilter.getDocIdSet(IndexReader) instead. |
SpanFilterResult |
SpanQueryFilter.bitSpans(IndexReader reader) |
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 |
CachingSpanFilter.bitSpans(IndexReader reader) |
Explanation |
ConstantScoreQuery.ConstantWeight.explain(IndexReader reader,
int doc) |
Explanation |
Weight.explain(IndexReader reader,
int doc)
An explanation of the score computation for the named document.
|
java.lang.Object |
FieldCache.getAuto(IndexReader reader,
java.lang.String field)
Checks the internal cache for an appropriate entry, and if
none is found reads
field to see if it contains integers, floats
or strings, and then calls one of the other methods in this class to get the
values. |
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)
Checks the internal cache for an appropriate entry, and if none
is found reads the terms out of
field and calls the given SortComparator
to get the sort values. |
DocIdSet |
RangeFilter.getDocIdSet(IndexReader reader)
Returns a DocIdSet with documents that should be
permitted in search results.
|
DocIdSet |
SpanQueryFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
PrefixFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
QueryWrapperFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
Filter.getDocIdSet(IndexReader reader) |
DocIdSet |
CachingWrapperFilter.getDocIdSet(IndexReader reader) |
DocIdSet |
RemoteCachingWrapperFilter.getDocIdSet(IndexReader reader)
Uses the
FilterManager to keep the cache for a filter on the
searcher side of a remote connection. |
DocIdSet |
CachingSpanFilter.getDocIdSet(IndexReader reader) |
double[] |
ExtendedFieldCache.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)
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 |
WildcardQuery.getEnum(IndexReader reader) |
protected abstract FilteredTermEnum |
MultiTermQuery.getEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.
|
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[] |
ExtendedFieldCache.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)
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)
Creates a comparator for the field in the given index.
|
ScoreDocComparator |
SortComparator.newComparator(IndexReader reader,
java.lang.String fieldname) |
Query |
ConstantScoreQuery.rewrite(IndexReader reader) |
Query |
WildcardQuery.rewrite(IndexReader reader) |
Query |
MultiTermQuery.rewrite(IndexReader reader) |
Query |
FuzzyQuery.rewrite(IndexReader reader) |
Query |
RangeQuery.rewrite(IndexReader reader) |
Query |
Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
Query |
PrefixQuery.rewrite(IndexReader reader) |
Query |
ConstantScoreRangeQuery.rewrite(IndexReader reader) |
Query |
MultiPhraseQuery.rewrite(IndexReader reader) |
Query |
DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
|
Query |
FilteredQuery.rewrite(IndexReader reader)
Rewrites the wrapped query.
|
Query |
BooleanQuery.rewrite(IndexReader reader) |
Scorer |
ConstantScoreQuery.ConstantWeight.scorer(IndexReader reader) |
Scorer |
Weight.scorer(IndexReader reader)
Constructs a scorer for this.
|
Constructor and Description |
---|
ConstantScoreQuery.ConstantScorer(Similarity similarity,
IndexReader reader,
Weight w) |
FieldSortedHitQueue(IndexReader reader,
SortField[] fields,
int size)
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.
|
TopFieldDocCollector(IndexReader reader,
Sort sort,
int numHits)
Construct to collect a given number of hits.
|
WildcardTermEnum(IndexReader reader,
Term term)
Creates a new
WildcardTermEnum . |
Modifier and Type | Method and Description |
---|---|
DocValues |
ByteFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
DocValues |
FloatFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
DocValues |
IntFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
DocValues |
ShortFieldSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader) |
abstract DocValues |
FieldCacheSource.getCachedFieldValues(FieldCache cache,
java.lang.String field,
IndexReader reader)
Return cached DocValues for input field and reader.
|
abstract DocValues |
ValueSource.getValues(IndexReader reader)
Return the DocValues used by the function query.
|
DocValues |
OrdFieldSource.getValues(IndexReader reader) |
DocValues |
FieldCacheSource.getValues(IndexReader reader) |
DocValues |
ReverseOrdFieldSource.getValues(IndexReader reader) |
Query |
ValueSourceQuery.rewrite(IndexReader reader) |
Query |
CustomScoreQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
Scorer |
BoostingTermQuery.BoostingTermWeight.scorer(IndexReader reader) |
Constructor and Description |
---|
PayloadSpanUtil(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
Explanation |
SpanWeight.explain(IndexReader reader,
int doc) |
PayloadSpans |
SpanNotQuery.getPayloadSpans(IndexReader reader) |
PayloadSpans |
SpanFirstQuery.getPayloadSpans(IndexReader reader) |
PayloadSpans |
SpanTermQuery.getPayloadSpans(IndexReader reader) |
PayloadSpans |
SpanOrQuery.getPayloadSpans(IndexReader reader) |
PayloadSpans |
SpanNearQuery.getPayloadSpans(IndexReader reader) |
PayloadSpans |
SpanQuery.getPayloadSpans(IndexReader reader)
Returns the matches for this query in an index, including access to any
Payload s at those
positions. |
Spans |
SpanNotQuery.getSpans(IndexReader reader) |
Spans |
SpanFirstQuery.getSpans(IndexReader reader) |
Spans |
SpanTermQuery.getSpans(IndexReader reader) |
Spans |
SpanOrQuery.getSpans(IndexReader reader) |
Spans |
SpanNearQuery.getSpans(IndexReader reader) |
abstract Spans |
SpanQuery.getSpans(IndexReader reader)
Expert: Returns the matches for this query in an index.
|
Query |
SpanNotQuery.rewrite(IndexReader reader) |
Query |
SpanFirstQuery.rewrite(IndexReader reader) |
Query |
SpanOrQuery.rewrite(IndexReader reader) |
Query |
SpanNearQuery.rewrite(IndexReader reader) |
Scorer |
SpanWeight.scorer(IndexReader reader) |
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.