Package org.apache.lucene.index

Code to maintain and access indices.

Interface Summary

IndexCommitPoint Expert: represents a single commit into an index as seen by the IndexDeletionPolicy.
IndexDeletionPolicy Expert: policy for deletion of stale index commits.
TermDocsTermDocs provides an interface for enumerating <document, frequency> pairs for a term.
TermFreqVectorProvides access to stored term vector of a document field.
TermPositions TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.
TermPositionVectorExtends TermFreqVector to provide additional information about positions in which each of the terms is found.

Class Summary

CheckIndex Basic tool to check the health of an index and write a new segments file that removes reference to problematic segments.
ConcurrentMergeSchedulerA MergeScheduler that runs each merge using a separate thread, up until a maximum number of threads (setMaxThreadCount(int)) at which points merges are run in the foreground, serially.
FieldNormModifier Given a directory and a list of fields, updates the fieldNorms in place for every document.
FieldSortedTermVectorMapper For each Field, store a sorted collection of TermVectorEntrys

This is not thread-safe.

FilterIndexReaderA FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterIndexReader.FilterTermDocsBase class for filtering TermDocs implementations.
FilterIndexReader.FilterTermEnumBase class for filtering TermEnum implementations.
FilterIndexReader.FilterTermPositionsBase class for filtering TermPositions implementations.
IndexFileNameFilter Filename filter that accept filenames and extensions only created by Lucene.
IndexModifier [Note that as of 2.1, all but one of the methods in this class are available via IndexWriter.
IndexReaderIndexReader is an abstract class, providing an interface for accessing an index.
IndexReader.FieldOption Constants describing field properties, for example used for IndexReader.getFieldNames(IndexReader.FieldOption).
IndexWriterAn IndexWriter creates and maintains an index.
KeepOnlyLastCommitDeletionPolicy This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done.
LogByteSizeMergePolicyThis is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
LogDocMergePolicyThis is a LogMergePolicy that measures size of a segment as the number of documents (not taking deletions into account).
LogMergePolicyThis class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has <32mergeFactor segments in it.
MergePolicy Expert: a MergePolicy determines the sequence of primitive merge operations to be used for overall merge and optimize operations.
MergePolicy.MergeSpecification A MergeSpecification instance provides the information necessary to perform multiple merges.
MergePolicy.OneMergeOneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment.
MergeSchedulerExpert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy.
MultipleTermPositions Describe class MultipleTermPositions here.
MultiReaderAn IndexReader which reads multiple indexes, appending their content.
ParallelReaderAn IndexReader which reads multiple, parallel indexes.
Payload A Payload is metadata that can be stored together with each occurrence of a term.
PositionBasedTermVectorMapper For each Field, store position by position information.
PositionBasedTermVectorMapper.TVPositionInfo Container for a term at a position
SegmentInfos.FindSegmentsFile Utility class for executing code that needs to do something with the current segments file.
SerialMergeSchedulerA MergeScheduler that simply does each merge sequentially, using the current thread.
SnapshotDeletionPolicyA IndexDeletionPolicy that wraps around any other IndexDeletionPolicy and adds the ability to hold and later release a single "snapshot" of an index.
SortedTermVectorMapper Store a sorted collection of TermVectorEntrys.
TermA Term represents a word from text.
TermEnumAbstract class for enumerating terms.
TermVectorEntry Convenience class for holding TermVector information.
TermVectorEntryFreqSortedComparator Compares TermVectorEntrys first by frequency and then by the term (case-sensitive)
TermVectorMapper The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader.getTermFreqVector(int,String).
TermVectorOffsetInfo The TermVectorOffsetInfo class holds information pertaining to a Term in a TermPositionVector's offset information.

Exception Summary

CorruptIndexException This exception is thrown when Lucene detects an inconsistency in the index.
FieldReaderException
MergePolicy.MergeAbortedException
MergePolicy.MergeExceptionException thrown if there are any problems while executing a merge.
StaleReaderException This exception is thrown when an IndexReader tries to make changes to the index (via IndexReader.deleteDocument(int), IndexReader.undeleteAll() or IndexReader.setNorm) but changes have already been committed to the index since this reader was instantiated.
Code to maintain and access indices.