Uses of Package
org.apache.lucene.index
Package
Description
Codecs API: API for customization of the encoding and structure of the index.
Compressing helper classes.
Lucene 9.0 file format.
BlockTree terms dictionary.
Lucene 9.0 compressing format.
Lucene 9.1 file format.
Postings format that can delegate to different formats per-field.
The logical representation of a
Document
for indexing and
searching.Geospatial Utility Implementations for Lucene Core
Code to maintain and access indices.
Internal bridges to package-private internals, for use by the lucene test framework only.
Code to search indices.
Comparators, used to compare hits so as to determine their sort order when collecting the top
results with
TopFieldCollector
.This package contains the various ranking models that can be used in Lucene.
Some utility classes.
Finite-state automaton for regular expressions.
Block KD-tree, implementing the generic spatial data structure described in this paper.
Utility classes for working with token streams as graphs.
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
-
ClassDescriptionA per-document numeric value.Access to the Field Info file that describes document fields and whether or not they are indexed.Collection of
FieldInfo
s (accessible by number or by name).Provides aTerms
index for fields that have it, and lists which fields do.Per-document scoring factors.Extension ofPostingsEnum
which also provides information about upcoming impacts.Represents a single field for indexing.Describes the properties of a field.Controls how much information is stored in the postings lists.Holds common state used during segment merging.A per-document numeric value.An ordinal basedTermState
Access to indexed numeric values.We recurse thePointValues.PointTree
, using a provided instance of this to guide the recursion.Basic operations to read the KD-tree.Iterates through the postings.Embeds a [read-only] SegmentInfo and adds per-commit fields.Information about a segment such as its name, directory, and files related to the segment.Holder class for common parameters used during read.Holder class for common parameters used during write.A per-document byte[] with presorted values.A list of per-document numeric values, sorted according toLong.compare(long, long)
.A multi-valued version ofSortedDocValues
.Expert: provides a low-level means of accessing the stored field values in an index.Enumeration of possible return values forStoredFieldVisitor.needsField(org.apache.lucene.index.FieldInfo)
.Iterator to seek (TermsEnum.seekCeil(BytesRef)
,TermsEnum.seekExact(BytesRef)
) or step through (BytesRefIterator.next()
terms to obtain frequency information (TermsEnum.docFreq()
),PostingsEnum
orPostingsEnum
for the current term (TermsEnum.postings(org.apache.lucene.index.PostingsEnum)
.Encapsulates all required internal state to position the associatedTermsEnum
without re-seeking.This class provides access to per-document floating point vector values indexed asKnnVectorField
. -
-
ClassDescriptionAccess to the Field Info file that describes document fields and whether or not they are indexed.Collection of
FieldInfo
s (accessible by number or by name).Extension ofPostingsEnum
which also provides information about upcoming impacts.Holds common state used during segment merging.A per-document numeric value.An ordinal basedTermState
Access to indexed numeric values.Iterates through the postings.Embeds a [read-only] SegmentInfo and adds per-commit fields.Information about a segment such as its name, directory, and files related to the segment.Holder class for common parameters used during read.Holder class for common parameters used during write.Encapsulates all required internal state to position the associatedTermsEnum
without re-seeking. -
ClassDescriptionProvides a
Terms
index for fields that have it, and lists which fields do.Holder class for common parameters used during read.Holder class for common parameters used during write.Access to the terms in a specific field.Iterator to seek (TermsEnum.seekCeil(BytesRef)
,TermsEnum.seekExact(BytesRef)
) or step through (BytesRefIterator.next()
terms to obtain frequency information (TermsEnum.docFreq()
),PostingsEnum
orPostingsEnum
for the current term (TermsEnum.postings(org.apache.lucene.index.PostingsEnum)
. -
ClassDescriptionAccess to the Field Info file that describes document fields and whether or not they are indexed.Collection of
FieldInfo
s (accessible by number or by name).Provides aTerms
index for fields that have it, and lists which fields do.Represents a single field for indexing.Holds common state used during segment merging.Information about a segment such as its name, directory, and files related to the segment.Expert: provides a low-level means of accessing the stored field values in an index. -
ClassDescriptionAccess to the Field Info file that describes document fields and whether or not they are indexed.Holder class for common parameters used during read.Holder class for common parameters used during write.This class provides access to per-document floating point vector values indexed as
KnnVectorField
. -
ClassDescriptionHolder class for common parameters used during read.Holder class for common parameters used during write.This class provides access to per-document floating point vector values indexed as
KnnVectorField
. -
ClassDescriptionDocValues types.Access to the Field Info file that describes document fields and whether or not they are indexed.Represents a single field for indexing.Describes the properties of a field.Controls how much information is stored in the postings lists.Expert: provides a low-level means of accessing the stored field values in an index.Enumeration of possible return values for
StoredFieldVisitor.needsField(org.apache.lucene.index.FieldInfo)
.Vector similarity function; used in search to return top K most similar vectors to a target vector. -
ClassDescriptionUsed by
PointValues.intersect(org.apache.lucene.index.PointValues.IntersectVisitor)
to check how each recursive cell corresponds to the query. -
ClassDescriptionBase class for implementing
CompositeReader
s based on an array of sub-readers.A base TermsEnum that adds default implementations forBaseTermsEnum.attributes()
BaseTermsEnum.termState()
BaseTermsEnum.seekExact(BytesRef)
BaseTermsEnum.seekExact(BytesRef, TermState)
In some cases, the default implementation may be slow and consume huge memory, so subclass SHOULD have its own implementation if possible.A per-document numeric value.Run-time configuration options for CheckIndex commands.Returned fromCheckIndex.checkIndex()
detailing the health and status of the index.Status from testing DocValuesStatus from testing field infos.Status from testing field norms.Status from testing index sortStatus from testing livedocsStatus from testing PointValuesHolds the status of each segment in the index.Status from testing soft deletesStatus from testing stored fields.Status from testing term index.Status from testing stored fields.Status from testing VectorValuesLeafReader implemented by codec APIs.Instances of this reader type can only be used to get stored fields from the underlying LeafReaders, but it is not possible to directly retrieve postings.IndexReaderContext
forCompositeReader
instance.Runs a merge thread to execute a single merge, then exits.DirectoryReader is an implementation ofCompositeReader
that can read indexes in aDirectory
.Utility class to help merging documents from sub-readers according to either simple concatenated (unsorted) order, or by a specified index-time sort, skipping deleted documents and remapping non-deleted documents.Represents one sub-reader being mergedDocValues types.Access to the Field Info file that describes document fields and whether or not they are indexed.Collection ofFieldInfo
s (accessible by number or by name).Provides aTerms
index for fields that have it, and lists which fields do.AFilterCodecReader
contains another CodecReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.A FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.Factory class passed to FilterDirectoryReader constructor that allows subclasses to wrap the filtered DirectoryReader's subreaders.Abstract class for enumerating a subset of all terms.Return value, if term should be accepted or the iteration shouldEND
.AFilterLeafReader
contains another LeafReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.Base class for filteringFields
implementations.Base class for filteringTerms
implementations.Base class for filteringTermsEnum
implementations.A wrapper forMergePolicy
instances.Per-document scoring factors.Information about upcoming impacts, ie.Extension ofPostingsEnum
which also provides information about upcoming impacts.Source ofImpacts
.Represents a single field for indexing.Describes the properties of a field.Expert: represents a single commit into an index as seen by theIndexDeletionPolicy
orIndexReader
.Expert: policy for deletion of staleindex commits
.Controls how much information is stored in the postings lists.IndexReader is an abstract class, providing an interface for accessing a point-in-time view of an index.A utility class that gives hooks in order to help build a cache based on the data that is contained in this index.A cache key identifying a resource that is being cached on.A listener that is called when a resource gets closed.A struct like class that represents a hierarchical relationship betweenIndexReader
instances.Handles how documents should be sorted in an index, both within a segment and between segments.Used for sorting documents across segmentsA comparator of doc IDs, used for sorting documents within a segmentProvide a NumericDocValues instance for a LeafReaderProvide a SortedDocValues instance for a LeafReaderAnIndexWriter
creates and maintains an index.DocStats for this indexIfDirectoryReader.open(IndexWriter)
has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits.Holds all the configuration that is used to create anIndexWriter
.Specifies the open mode forIndexWriter
.A callback event listener for recording key events happened inside IndexWriterProvides read-only metadata about a leaf.LeafReader
is an abstract class, providing an interface for accessing an index.IndexReaderContext
forLeafReader
instances.Holds all the configuration used byIndexWriter
with few setters for settings that can be changed on anIndexWriter
instance "live".This class implements aMergePolicy
that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.Expert: a MergePolicy determines the sequence of primitive merge operations.Thrown when a merge was explicitly aborted becauseIndexWriter.abortMerges()
was called.This interface represents the current context of the merge selection process.A MergeSpecification instance provides the information necessary to perform multiple merges.OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment.Progress and state for an executing merge.Reason for pausing the merge thread.Expert:IndexWriter
uses an instance implementing this interface to execute the merges selected by aMergePolicy
.Provides access to new merges and executes the actual mergeHolds common state used during segment merging.A map of doc IDs.MergeTrigger is passed toMergePolicy.findMerges(MergeTrigger, SegmentInfos, MergePolicy.MergeContext)
to indicate the event that triggered the merge.Provides a singleFields
term index view over anIndexReader
.ExposesPostingsEnum
, merged fromPostingsEnum
API of sub-segments.Holds aPostingsEnum
along with the correspondingReaderSlice
.A per-document numeric value.A wrapping merge policy that wraps theMergePolicy.OneMerge
objects returned by the wrapped merge policy.Maps per-segment ordinals to/from global ordinal space, using a compact packed-ints representation.Access to indexed numeric values.We recurse thePointValues.PointTree
, using a provided instance of this to guide the recursion.Basic operations to read the KD-tree.Used byPointValues.intersect(org.apache.lucene.index.PointValues.IntersectVisitor)
to check how each recursive cell corresponds to the query.Iterates through the postings.Prefix codes term instances (prefixes are shared).An iterator over the list of terms stored in aPrefixCodedTerms
.Base for query timeout implementations, which will provide ashouldExit()
method, used withExitableDirectoryReader
.Provides random access to vectors by dense ordinal.Subreader slice from a parent composite reader.Embeds a [read-only] SegmentInfo and adds per-commit fields.Information about a segment such as its name, directory, and files related to the segment.A collection of segmentInfo objects with methods for operating on those segments in relation to the file system.Holder class for common parameters used during read.Holder class for common parameters used during write.AnIndexDeletionPolicy
that wraps any otherIndexDeletionPolicy
and adds the ability to hold and later release snapshots of an index.A per-document byte[] with presorted values.A list of per-document numeric values, sorted according toLong.compare(long, long)
.A multi-valued version ofSortedDocValues
.Reads/Writes a named SortField from a segment info file, used to record index sortsExpert: provides a low-level means of accessing the stored field values in an index.Enumeration of possible return values forStoredFieldVisitor.needsField(org.apache.lucene.index.FieldInfo)
.A Term represents a word from text.Access to the terms in a specific field.Iterator to seek (TermsEnum.seekCeil(BytesRef)
,TermsEnum.seekExact(BytesRef)
) or step through (BytesRefIterator.next()
terms to obtain frequency information (TermsEnum.docFreq()
),PostingsEnum
orPostingsEnum
for the current term (TermsEnum.postings(org.apache.lucene.index.PostingsEnum)
.Represents returned result fromTermsEnum.seekCeil(org.apache.lucene.util.BytesRef)
.Encapsulates all required internal state to position the associatedTermsEnum
without re-seeking.Merges segments of approximately equal size, subject to an allowed number of segments per tier.Holds score and explanation for a single candidate merge.An interface for implementations that support 2-phase commit.Thrown byTwoPhaseCommitTool.execute(TwoPhaseCommit...)
when an object fails to commit().Thrown byTwoPhaseCommitTool.execute(TwoPhaseCommit...)
when an object fails to prepareCommit().Vector similarity function; used in search to return top K most similar vectors to a target vector.This class provides access to per-document floating point vector values indexed asKnnVectorField
. -
ClassDescriptionA
MergeScheduler
that runs each merge using a separate thread.DirectoryReader is an implementation ofCompositeReader
that can read indexes in aDirectory
.Access to the Field Info file that describes document fields and whether or not they are indexed.Collection ofFieldInfo
s (accessible by number or by name).Information about upcoming impacts, ie.A cache key identifying a resource that is being cached on.AnIndexWriter
creates and maintains an index.Embeds a [read-only] SegmentInfo and adds per-commit fields.IndexReader implementation over a single segment. -
ClassDescriptionA per-document numeric value.DirectoryReader is an implementation of
CompositeReader
that can read indexes in aDirectory
.Extension ofPostingsEnum
which also provides information about upcoming impacts.Source ofImpacts
.IndexReader is an abstract class, providing an interface for accessing a point-in-time view of an index.A struct like class that represents a hierarchical relationship betweenIndexReader
instances.Handles how documents should be sorted in an index, both within a segment and between segments.AnIndexWriter
creates and maintains an index.LeafReader
is an abstract class, providing an interface for accessing an index.IndexReaderContext
forLeafReader
instances.A per-document numeric value.Iterates through the postings.Prefix codes term instances (prefixes are shared).A per-document byte[] with presorted values.A list of per-document numeric values, sorted according toLong.compare(long, long)
.A multi-valued version ofSortedDocValues
.Reads/Writes a named SortField from a segment info file, used to record index sortsExpert: provides a low-level means of accessing the stored field values in an index.A Term represents a word from text.Access to the terms in a specific field.Iterator to seek (TermsEnum.seekCeil(BytesRef)
,TermsEnum.seekExact(BytesRef)
) or step through (BytesRefIterator.next()
terms to obtain frequency information (TermsEnum.docFreq()
),PostingsEnum
orPostingsEnum
for the current term (TermsEnum.postings(org.apache.lucene.index.PostingsEnum)
.Represents returned result fromTermsEnum.seekCeil(org.apache.lucene.util.BytesRef)
.Encapsulates all required internal state to position the associatedTermsEnum
without re-seeking. -
-
ClassDescriptionThis class tracks the number and position / offset parameters of terms being added to the index.
-
ClassDescriptionAccess to indexed numeric values.A Term represents a word from text.Access to the terms in a specific field.
-
ClassDescriptionAccess to the terms in a specific field.Iterator to seek (
TermsEnum.seekCeil(BytesRef)
,TermsEnum.seekExact(BytesRef)
) or step through (BytesRefIterator.next()
terms to obtain frequency information (TermsEnum.docFreq()
),PostingsEnum
orPostingsEnum
for the current term (TermsEnum.postings(org.apache.lucene.index.PostingsEnum)
. -
ClassDescriptionA map of doc IDs.Access to indexed numeric values.Basic operations to read the KD-tree.
-
-
ClassDescriptionProvides random access to vectors by dense ordinal.Something (generally a
VectorValues
) that provides aRandomAccessVectorValues
.Vector similarity function; used in search to return top K most similar vectors to a target vector.