[Missing <summary> documentation for "N:Lucene.Net.Index"]

Classes

  ClassDescription
Public classAbstractAllTermDocs
Base class for enumerating all but deleted docs.

NOTE: this class is meant only to be used internally by Lucene; it's only public so it can be shared across packages. This means the API is freely subject to change, and, the class could be removed entirely, in any Lucene release. Use directly at your own risk! */

Public classByteBlockPool
Public classByteBlockPool..::..Allocator
Public classByteSliceReader
Public classByteSliceWriter
Class to write byte streams into slices of shared byte[]. This is used by DocumentsWriter to hold the posting list for many terms in RAM.
Public classCheckIndex
Basic tool and API to check the health of an index and write a new segments file that removes reference to problematic segments.

As this tool checks every byte in the index, on a large index it can take quite a long time to run.

WARNING: this tool and API is new and experimental and is subject to suddenly change in the next release. Please make a complete backup of your index before using this to fix your index!

Public classCheckIndex..::..Status
Returned from {@link #CheckIndex()} detailing the health and status of the index.

WARNING: this API is new and experimental and is subject to suddenly change in the next release.

Public classCheckIndex..::..Status..::..FieldNormStatus
Status from testing field norms.
Public classCheckIndex..::..Status..::..SegmentInfoStatus
Holds the status of each segment in the index. See {@link #segmentInfos}.

WARNING: this API is new and experimental and is subject to suddenly change in the next release.

Public classCheckIndex..::..Status..::..StoredFieldStatus
Status from testing stored fields.
Public classCheckIndex..::..Status..::..TermIndexStatus
Status from testing term index.
Public classCheckIndex..::..Status..::..TermVectorStatus
Status from testing stored fields.
Public classCompoundFileReader
Class for accessing a compound stream. This class implements a directory, but is limited to only read operations. Directory methods that would normally modify data throw an exception.
Public classCompoundFileReader..::..CSIndexInput
Implementation of an IndexInput that reads from a portion of the compound file. The visibility is left as "package" *only* because this helps with testing since JUnit test cases in a different class can then access package fields of this class.
Public classCompoundFileWriter
Combines multiple files into a single compound file. The file format:
  • VInt fileCount
  • {Directory} fileCount entries with the following structure:
    • long dataOffset
    • String fileName
  • {File Data} fileCount entries with the raw data of the corresponding file
The fileCount integer indicates how many files are contained in this compound file. The {directory} that follows has that many entries. Each directory entry contains a long pointer to the start of this file's data section, and a String with that file's name.
Public classConcurrentMergeScheduler
A {@link MergeScheduler} that runs each merge using a separate thread, up until a maximum number of threads ({@link #setMaxThreadCount}) at which when a merge is needed, the thread(s) that are updating the index will pause until one or more merges completes. This is a simple way to use concurrency in the indexing process without having to create and manage application level threads.
Public classConcurrentMergeScheduler..::..MergeThread
Public classCorruptIndexException
This exception is thrown when Lucene detects an inconsistency in the index.
Public classDirectoryReader
An IndexReader which reads indexes with multiple segments.
Public classDocumentsWriter
This class accepts multiple added documents and directly writes a single segment file. It does this more efficiently than creating a single segment per document (with DocumentWriter) and doing standard merges on those segments. Each added document is passed to the {@link DocConsumer}, which in turn processes the document and interacts with other consumers in the indexing chain. Certain consumers, like {@link StoredFieldsWriter} and {@link TermVectorsTermsWriter}, digest a document and immediately write bytes to the "doc store" files (ie, they do not consume RAM per document, except while they are processing the document). Other consumers, eg {@link FreqProxTermsWriter} and {@link NormsWriter}, buffer bytes in RAM and flush only when a new segment is produced. Once we have used our allowed RAM buffer, or the number of added docs is large enough (in the case we are flushing by doc count instead of RAM usage), we create a real segment and flush it to the Directory. Threads: Multiple threads are allowed into addDocument at once. There is an initial synchronized call to getThreadState which allocates a ThreadState for this thread. The same thread will get the same ThreadState over time (thread affinity) so that if there are consistent patterns (for example each thread is indexing a different content source) then we make better use of RAM. Then processDocument is called on that ThreadState without synchronization (most of the "heavy lifting" is in this call). Finally the synchronized "finishDocument" is called to flush changes to the directory. When flush is called by IndexWriter, or, we flush internally when autoCommit=false, we forcefully idle all threads and flush only once they are all idle. This means you can call flush with a given thread even while other threads are actively adding/deleting documents. Exceptions: Because this class directly updates in-memory posting lists, and flushes stored fields and term vectors directly to files in the directory, there are certain limited times when an exception can corrupt this state. For example, a disk full while flushing stored fields leaves this file in a corrupt state. Or, an OOM exception while appending to the in-memory posting lists can corrupt that posting list. We call such exceptions "aborting exceptions". In these cases we must call abort() to discard all docs added since the last flush. All other exceptions ("non-aborting exceptions") can still partially update the index structures. These updates are consistent, but, they represent only a part of the document seen up until the exception was hit. When this happens, we immediately mark the document as deleted so that the document is always atomically ("all or none") added to the index.
Public classDoubleFieldEnumerator
Implementation for enumerating over all of the terms in a double numeric field.
Public classEmptyVector
A simple TermFreqVector implementation for an empty vector for use with a deleted document or a document that does not have the field that is being enumerated.
Public classFieldEnumerator<(Of <(<'T>)>)>
Public classFieldEnumerator<(Of <(<'T>)>)>..::..TermEnumerator
The enumerator over the terms in an index.
Public classFieldInfo
Public classFieldInfos
Access to the Fieldable Info file that describes document fields and whether or not they are indexed. Each segment has a separate Fieldable Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.
Public classFieldInvertState
This class tracks the number and position / offset parameters of terms being added to the index. The information collected in this class is also used to calculate the normalization factor for a field.

WARNING: This API is new and experimental, and may suddenly change.

Public classFieldReaderException
Public classFieldSortedTermVectorMapper
For each Field, store a sorted collection of {@link TermVectorEntry}s

This is not thread-safe.

Public classFieldsReader
Class responsible for access to stored document fields.

It uses <segment>.fdt and <segment>.fdx; files.

Public classFilterIndexReader
A
CopyC#
FilterIndexReader
contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class
CopyC#
FilterIndexReader
itself simply implements all abstract methods of
CopyC#
IndexReader
with versions that pass all requests to the contained index reader. Subclasses of
CopyC#
FilterIndexReader
may further override some of these methods and may also provide additional methods and fields.
Public classFilterIndexReader..::..FilterTermDocs
Base class for filtering {@link TermDocs} implementations.
Public classFilterIndexReader..::..FilterTermEnum
Base class for filtering {@link TermEnum} implementations.
Public classFilterIndexReader..::..FilterTermPositions
Base class for filtering {@link TermPositions} implementations.
Public classFloatFieldEnumerator
Implementation for enumerating over all of the terms in a float numeric field.
Public classIndexCommit

Expert: represents a single commit into an index as seen by the {@link IndexDeletionPolicy} or {@link IndexReader}.

Changes to the content of an index are made visible only after the writer who made that change commits by writing a new segments file (

CopyC#
segments_N
). This point in time, when the action of writing of a new segments file to the directory is completed, is an index commit.

Each index commit point has a unique segments file associated with it. The segments file associated with a later index commit point would have a larger N.

WARNING: This API is a new and experimental and may suddenly change.

Public classIndexFileDeleter
Public classIndexFileNameFilter
Filename filter that accept filenames and extensions only created by Lucene.
Public classIndexFileNames
Useful constants representing filenames and extensions used by lucene
Public classIndexModifier Obsolete.

[Note that as of 2.1, all but one of the methods in this class are available via {@link IndexWriter}. The one method that is not available is {@link #DeleteDocument(int)}.]

A class to modify an index, i.e. to delete and add documents. This class hides {@link IndexReader} and {@link IndexWriter} so that you do not need to care about implementation details such as that adding documents is done via IndexWriter and deletion is done via IndexReader.

Note that you cannot create more than one

CopyC#
IndexModifier
object on the same directory at the same time.

Example usage:

CopyC#
<font color="#ffffff">    </font><font color="#000000">Analyzer analyzer = </font><font color="#7f0055"><b>new </b></font><font color="#000000">StandardAnalyzer</font><font color="#000000">()</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#3f7f5f">// create an index in /tmp/index, overwriting an existing one:</font><br /><font color="#ffffff">    </font><font color="#000000">IndexModifier indexModifier = </font><font color="#7f0055"><b>new </b></font><font color="#000000">IndexModifier</font><font color="#000000">(</font><font color="#2a00ff">"/tmp/index"</font><font color="#000000">, analyzer, </font><font color="#7f0055"><b>true</b></font><font color="#000000">)</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">Document doc = </font><font color="#7f0055"><b>new </b></font><font color="#000000">Document</font><font color="#000000">()</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">doc.add</font><font color="#000000">(</font><font color="#7f0055"><b>new </b></font><font color="#000000">Field</font><font color="#000000">(</font><font color="#2a00ff">"id"</font><font color="#000000">, </font><font color="#2a00ff">"1"</font><font color="#000000">, Field.Store.YES, Field.Index.NOT_ANALYZED</font><font color="#000000">))</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">doc.add</font><font color="#000000">(</font><font color="#7f0055"><b>new </b></font><font color="#000000">Field</font><font color="#000000">(</font><font color="#2a00ff">"body"</font><font color="#000000">, </font><font color="#2a00ff">"a simple test"</font><font color="#000000">, Field.Store.YES, Field.Index.ANALYZED</font><font color="#000000">))</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">indexModifier.addDocument</font><font color="#000000">(</font><font color="#000000">doc</font><font color="#000000">)</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#7f0055"><b>int </b></font><font color="#000000">deleted = indexModifier.delete</font><font color="#000000">(</font><font color="#7f0055"><b>new </b></font><font color="#000000">Term</font><font color="#000000">(</font><font color="#2a00ff">"id"</font><font color="#000000">, </font><font color="#2a00ff">"1"</font><font color="#000000">))</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">System.out.println</font><font color="#000000">(</font><font color="#2a00ff">"Deleted " </font><font color="#000000">+ deleted + </font><font color="#2a00ff">" document"</font><font color="#000000">)</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">indexModifier.flush</font><font color="#000000">()</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">System.out.println</font><font color="#000000">(</font><font color="#000000">indexModifier.docCount</font><font color="#000000">() </font><font color="#000000">+ </font><font color="#2a00ff">" docs in index"</font><font color="#000000">)</font><font color="#000000">;</font><br /><font color="#ffffff">    </font><font color="#000000">indexModifier.close</font><font color="#000000">()</font><font color="#000000">;</font>

Not all methods of IndexReader and IndexWriter are offered by this class. If you need access to additional methods, either use those classes directly or implement your own class that extends

CopyC#
IndexModifier
.

Although an instance of this class can be used from more than one thread, you will not get the best performance. You might want to use IndexReader and IndexWriter directly for that (but you will need to care about synchronization yourself then).

While you can freely mix calls to add() and delete() using this class, you should batch you calls for best performance. For example, if you want to update 20 documents, you should first delete all those documents, then add all the new documents.

Public classIndexReader
IndexReader is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, so that any subclass which implements it is searchable.

Concrete subclasses of IndexReader are usually constructed with a call to one of the static

CopyC#
open()
methods, e.g. {@link #Open(String, boolean)}.

For efficiency, in this API documents are often referred to via document numbers, non-negative integers which each name a unique document in the index. These document numbers are ephemeral--they may change as documents are added to and deleted from an index. Clients should thus not rely on a given document having the same number between sessions.

An IndexReader can be opened on a directory for which an IndexWriter is opened already, but it cannot be used to delete documents from the index then.

NOTE: for backwards API compatibility, several methods are not listed as abstract, but have no useful implementations in this base class and instead always throw UnsupportedOperationException. Subclasses are strongly encouraged to override these methods, but in many cases may not need to.

NOTE: as of 2.4, it's possible to open a read-only IndexReader using one of the static open methods that accepts the boolean readOnly parameter. Such a reader has better concurrency as it's not necessary to synchronize on the isDeleted method. Currently the default for readOnly is false, meaning if not specified you will get a read/write IndexReader. But in 3.0 this default will change to true, meaning you must explicitly specify false if you want to make changes with the resulting IndexReader.

NOTE: {@link

} instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the
CopyC#
IndexReader
instance; use your own (non-Lucene) objects instead.
Public classIndexReader..::..FieldOption
Constants describing field properties, for example used for {@link IndexReader#GetFieldNames(FieldOption)}.
Public classIndexWriter
An
CopyC#
IndexWriter
creates and maintains an index.

The

CopyC#
create
argument to the {@link #IndexWriter(Directory, Analyzer, boolean) constructor} determines whether a new index is created, or whether an existing index is opened. Note that you can open an index with
CopyC#
create=true
even while readers are using the index. The old readers will continue to search the "point in time" snapshot they had opened, and won't see the newly created index until they re-open. There are also {@link #IndexWriter(Directory, Analyzer) constructors} with no
CopyC#
create
argument which will create a new index if there is not already an index at the provided path and otherwise open the existing index.

In either case, documents are added with {@link #AddDocument(Document) addDocument} and removed with {@link #DeleteDocuments(Term)} or {@link #DeleteDocuments(Query)}. A document can be updated with {@link #UpdateDocument(Term, Document) updateDocument} (which just deletes and then adds the entire document). When finished adding, deleting and updating documents, {@link #Close() close} should be called.

These changes are buffered in memory and periodically flushed to the {@link Directory} (during the above method calls). A flush is triggered when there are enough buffered deletes (see {@link #setMaxBufferedDeleteTerms}) or enough added documents since the last flush, whichever is sooner. For the added documents, flushing is triggered either by RAM usage of the documents (see {@link #setRAMBufferSizeMB}) or the number of added documents. The default is to flush when RAM usage hits 16 MB. For best indexing speed you should flush by RAM usage with a large RAM buffer. Note that flushing just moves the internal buffered state in IndexWriter into the index, but these changes are not visible to IndexReader until either {@link #Commit()} or {@link #close} is called. A flush may also trigger one or more segment merges which by default run with a background thread so as not to block the addDocument calls (see below for changing the {@link MergeScheduler}).

The optional

argument to the {@link #IndexWriter(Directory, boolean, Analyzer) constructors} controls visibility of the changes to {@link IndexReader} instances reading the same index. When this is
CopyC#
false
, changes are not visible until {@link #Close()} or {@link #Commit()} is called. Note that changes will still be flushed to the {@link Directory} as new files, but are not committed (no new
CopyC#
segments_N
file is written referencing the new files, nor are the files sync'd to stable storage) until {@link #Close()} or {@link #Commit()} is called. If something goes terribly wrong (for example the JVM crashes), then the index will reflect none of the changes made since the last commit, or the starting state if commit was not called. You can also call {@link #Rollback()}, which closes the writer without committing any changes, and removes any index files that had been flushed but are now unreferenced. This mode is useful for preventing readers from refreshing at a bad time (for example after you've done all your deletes but before you've done your adds). It can also be used to implement simple single-writer transactional semantics ("all or none"). You can do a two-phase commit by calling {@link #PrepareCommit()} followed by {@link #Commit()}. This is necessary when Lucene is working with an external resource (for example, a database) and both must either commit or rollback the transaction.

When

CopyC#
autoCommit
is
CopyC#
true
then the writer will periodically commit on its own. [Deprecated: Note that in 3.0, IndexWriter will no longer accept autoCommit=true (it will be hardwired to false). You can always call {@link #Commit()} yourself when needed]. There is no guarantee when exactly an auto commit will occur (it used to be after every flush, but it is now after every completed merge, as of 2.4). If you want to force a commit, call {@link #Commit()}, or, close the writer. Once a commit has finished, newly opened {@link IndexReader} instances will see the changes to the index as of that commit. When running in this mode, be careful not to refresh your readers while optimize or segment merges are taking place as this can tie up substantial disk space.

Public classIndexWriter..::..IndexReaderWarmer
If {@link #getReader} 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. This is not required for near real-time search, but will reduce search latency on opening a new near real-time reader after a merge completes.

NOTE: This API is experimental and might change in incompatible ways in the next release.

NOTE: warm is called before any deletes have been carried over to the merged segment.

Public classIndexWriter..::..MaxFieldLength
Specifies maximum field length (in number of tokens/terms) in {@link IndexWriter} constructors. {@link #SetMaxFieldLength(int)} overrides the value set by the constructor.
Public classIntFieldEnumerator
Implementation for enumerating over all of the terms in an int numeric field.
Public classKeepOnlyLastCommitDeletionPolicy
This {@link IndexDeletionPolicy} implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done. This is the default deletion policy.
Public classLogByteSizeMergePolicy
This is a {@link LogMergePolicy} that measures size of a segment as the total byte size of the segment's files.
Public classLogDocMergePolicy
This is a {@link LogMergePolicy} that measures size of a segment as the number of documents (not taking deletions into account).
Public classLogMergePolicy

This class implements a {@link MergePolicy} that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor. Whenever extra segments (beyond the merge factor upper bound) are encountered, all segments within the level are merged. You can get or set the merge factor using {@link #GetMergeFactor()} and {@link #SetMergeFactor(int)} respectively.

This class is abstract and requires a subclass to define the {@link #size} method which specifies how a segment's size is determined. {@link LogDocMergePolicy} is one subclass that measures size by document count in the segment. {@link LogByteSizeMergePolicy} is another subclass that measures size as the total byte size of the file(s) for the segment.

Public classLongFieldEnumerator
Implementation for enumerating over all of the terms in a long numeric field.
Public classMergePolicy

Expert: a MergePolicy determines the sequence of primitive merge operations to be used for overall merge and optimize operations.

Whenever the segments in an index have been altered by {@link IndexWriter}, either the addition of a newly flushed segment, addition of many segments from addIndexes* calls, or a previous merge that may now need to cascade, {@link IndexWriter} invokes {@link #findMerges} to give the MergePolicy a chance to pick merges that are now required. This method returns a {@link MergeSpecification} instance describing the set of merges that should be done, or null if no merges are necessary. When IndexWriter.optimize is called, it calls {@link #findMergesForOptimize} and the MergePolicy should then return the necessary merges.

Note that the policy can return more than one merge at a time. In this case, if the writer is using {@link SerialMergeScheduler}, the merges will be run sequentially but if it is using {@link ConcurrentMergeScheduler} they will be run concurrently.

The default MergePolicy is {@link LogByteSizeMergePolicy}.

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

NOTE: This class typically requires access to package-private APIs (e.g.

CopyC#
SegmentInfos
) to do its job; if you implement your own MergePolicy, you'll need to put it in package Lucene.Net.Index in order to use these APIs.
Public classMergePolicy..::..MergeAbortedException
Public classMergePolicy..::..MergeException
Exception thrown if there are any problems while executing a merge.
Public classMergePolicy..::..MergeSpecification
A MergeSpecification instance provides the information necessary to perform multiple merges. It simply contains a list of {@link OneMerge} instances.
Public classMergePolicy..::..OneMerge
OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment. The merge spec includes the subset of segments to be merged as well as whether the new segment should use the compound file format.
Public classMergeScheduler

Expert: {@link IndexWriter} uses an instance implementing this interface to execute the merges selected by a {@link MergePolicy}. The default MergeScheduler is {@link ConcurrentMergeScheduler}.

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

NOTE: This class typically requires access to package-private APIs (eg, SegmentInfos) to do its job; if you implement your own MergePolicy, you'll need to put it in package Lucene.Net.Index in order to use these APIs.

Public classMultipleTermPositions
Allows you to iterate over the {@link TermPositions} for multiple {@link Term}s as a single {@link TermPositions}.
Public classMultiReader
An IndexReader which reads multiple indexes, appending their content.
Public classNumericFieldEnum<(Of <(<'T>)>)>
Base for enumerating over numeric fields.
Public classParallelReader
An IndexReader which reads multiple, parallel indexes. Each index added must have the same number of documents, but typically each contains different fields. Each document contains the union of the fields of all documents with the same document number. When searching, matches for a query term are from the first index added that has the field.

This is useful, e.g., with collections that have large fields which change rarely and small fields that change more frequently. The smaller fields may be re-indexed in a new index and both indexes may be searched together.

Warning: It is up to you to make sure all indexes are created and modified the same way. For example, if you add documents to one index, you need to add the same documents in the same order to the other indexes. Failure to do so will result in undefined behavior.

Public classPayload
A Payload is metadata that can be stored together with each occurrence of a term. This metadata is stored inline in the posting list of the specific term.

To store payloads in the index a {@link TokenStream} has to be used that produces payload data.

Use {@link TermPositions#GetPayloadLength()} and {@link TermPositions#GetPayload(byte[], int)} to retrieve the payloads from the index.

Public classPositionBasedTermVectorMapper
For each Field, store position by position information. It ignores frequency information

This is not thread-safe.

Public classPositionBasedTermVectorMapper..::..TVPositionInfo
Container for a term at a position
Public classReadOnlyDirectoryReader
Public classReadOnlySegmentReader
Public classSegmentInfo
Information about a segment such as it's name, directory, and files related to the segment. *

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

Public classSegmentInfos
A collection of segmentInfo objects with methods for operating on those segments in relation to the file system.

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

Public classSegmentInfos..::..FindSegmentsFile
Utility class for executing code that needs to do something with the current segments file. This is necessary with lock-less commits because from the time you locate the current segments file name, until you actually open it, read its contents, or check modified time, etc., it could have been deleted due to a writer commit finishing.
Public classSegmentMerger
The SegmentMerger class combines two or more Segments, represented by an IndexReader ({@link #add}, into a single Segment. After adding the appropriate readers, call the merge method to combine the segments.

If the compoundFile flag is set, then the segments will be merged into a compound file.

Public classSegmentReader

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

Public classSegmentReader..::..CoreReaders
Public classSegmentReader..::..Norm
Byte[] referencing is used because a new norm object needs to be created for each clone, and the byte array is all that is needed for sharing between cloned readers. The current norm referencing is for sharing between readers whereas the byte[] referencing is for copy on write which is independent of reader references (i.e. incRef, decRef).
Public classSegmentReader..::..Ref
Public classSegmentsGenCommit
Class that will force an index writer to open an index based on the generation in the segments.gen file as opposed to the highest generation found in a directory listing. A use case for using this IndexCommit when opening an IndexWriter would be if index snapshots (source) are being copied over an existing index (target) and the source now has a lower generation than the target due to initiating a rebuild of the index.
Public classSegmentTermDocs
Public classSegmentTermEnum
Public classSegmentTermPositions
Public classSerialMergeScheduler
A {@link MergeScheduler} that simply does each merge sequentially, using the current thread.
Public classSnapshotDeletionPolicy
A {@link IndexDeletionPolicy} that wraps around any other {@link IndexDeletionPolicy} and adds the ability to hold and later release a single "snapshot" of an index. While the snapshot is held, the {@link IndexWriter} will not remove any files associated with it even if the index is otherwise being actively, arbitrarily changed. Because we wrap another arbitrary {@link IndexDeletionPolicy}, this gives you the freedom to continue using whatever {@link IndexDeletionPolicy} you would normally want to use with your index. Note that you can re-use a single instance of SnapshotDeletionPolicy across multiple writers as long as they are against the same index Directory. Any snapshot held when a writer is closed will "survive" when the next writer is opened.

WARNING: This API is a new and experimental and may suddenly change.

Public classSortedTermVectorMapper
Store a sorted collection of {@link Lucene.Net.Index.TermVectorEntry}s. Collects all term information into a single, SortedSet.
NOTE: This Mapper ignores all Field information for the Document. This means that if you are using offset/positions you will not know what Fields they correlate with.
This is not thread-safe
Public classStaleReaderException
This exception is thrown when an {@link IndexReader} tries to make changes to the index (via {@link IndexReader#deleteDocument}, {@link IndexReader#undeleteAll} or {@link IndexReader#setNorm}) but changes have already been committed to the index since this reader was instantiated. When this happens you must open a new reader on the current index to make the changes.
Public classStringFieldEnumerator
Implementation for enumerating over terms with a string value.
Public classTerm
A Term represents a word from text. This is the unit of search. It is composed of two elements, the text of the word, as a string, and the name of the field that the text occured in, an interned string. Note that terms may represent more than words from text fields, but also things like dates, email addresses, urls, etc.
Public classTermDocEnumerator
Class to handle creating a TermDocs and allowing for seeking and enumeration. Used when you have a set of one or moreterms for which you want to enumerate over the documents that contain those terms.
Public classTermDocEnumerator..::..TermDocUsingTermsEnumerator
Class to handle enumeration over the TermDocs that does NOT close them on a call to Dispose!
Public classTermEnum
Abstract class for enumerating terms.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Public classTermVectorEntry
Convenience class for holding TermVector information.
Public classTermVectorEntryFreqSortedComparator
Compares {@link Lucene.Net.Index.TermVectorEntry}s first by frequency and then by the term (case-sensitive)
Public classTermVectorEnumerator
Class to allow for enumerating over the documents in the index to retrieve the term vector for each one.
Public classTermVectorMapper
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by {@link Lucene.Net.Index.IndexReader#GetTermFreqVector(int,String)}.

It is up to the implementation to make sure it is thread-safe.

Public classTermVectorOffsetInfo
The TermVectorOffsetInfo class holds information pertaining to a Term in a {@link Lucene.Net.Index.TermPositionVector}'s offset information. This offset information is the character offset as set during the Analysis phase (and thus may not be the actual offset in the original content).
Public classTermVectorsReader

Interfaces

  InterfaceDescription
Public interfaceIndexCommitPoint Obsolete.
Public interfaceIndexDeletionPolicy

Expert: policy for deletion of stale {@link IndexCommit index commits}.

Implement this interface, and pass it to one of the {@link IndexWriter} or {@link IndexReader} constructors, to customize when older {@link IndexCommit point-in-time commits} are deleted from the index directory. The default deletion policy is {@link KeepOnlyLastCommitDeletionPolicy}, which always removes old commits as soon as a new commit is done (this matches the behavior before 2.2).

One expected use case for this (and the reason why it was first created) is to work around problems with an index directory accessed via filesystems like NFS because NFS does not provide the "delete on last close" semantics that Lucene's "point in time" search normally relies on. By implementing a custom deletion policy, such as "a commit is only removed once it has been stale for more than X minutes", you can give your readers time to refresh to the new commit before {@link IndexWriter} removes the old commits. Note that doing so will increase the storage requirements of the index. See LUCENE-710 for details.

Public interfaceTermDocs
TermDocs provides an interface for enumerating <document, frequency> pairs for a term.

The document portion names each document containing the term. Documents are indicated by number. The frequency portion gives the number of times the term occurred in each document.

The pairs are ordered by document number.

Public interfaceTermFreqVector
Provides access to stored term vector of a document field. The vector consists of the name of the field, an array of the terms tha occur in the field of the {@link Lucene.Net.Documents.Document} and a parallel array of frequencies. Thus, getTermFrequencies()[5] corresponds with the frequency of getTerms()[5], assuming there are at least 5 terms in the Document.
Public interfaceTermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.

The document and frequency are the same as for a TermDocs. The positions portion lists the ordinal positions of each occurrence of a term in a document.

Public interfaceTermPositionVector
Extends
CopyC#
TermFreqVector
to provide additional information about positions in which each of the terms is found. A TermPositionVector not necessarily contains both positions and offsets, but at least one of these arrays exists.

Enumerations

  EnumerationDescription
Public enumerationFieldParser
The type of parser for the value of the term.