Expert: returns an IndexReader reading the index in
the given Directory, using a specific commit and with
a custom {@link IndexDeletionPolicy}. You should pass
readOnly=true, since it gives much better concurrent
performance, unless you intend to do write operations
(delete documents or change norms) with the reader.
Namespace: Lucene.Net.IndexAssembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
public static IndexReader Open( IndexCommit commit, IndexDeletionPolicy deletionPolicy, bool readOnly, int termInfosIndexDivisor ) |
Visual Basic |
---|
Public Shared Function Open ( _ commit As IndexCommit, _ deletionPolicy As IndexDeletionPolicy, _ readOnly As Boolean, _ termInfosIndexDivisor As Integer _ ) As IndexReader |
Visual C++ |
---|
public: static IndexReader^ Open( IndexCommit^ commit, IndexDeletionPolicy^ deletionPolicy, bool readOnly, int termInfosIndexDivisor ) |
Parameters
- commit
- Type: Lucene.Net.Index..::..IndexCommit
the specific {@link IndexCommit} to open; see {@link IndexReader#listCommits} to list all commits in a directory
- deletionPolicy
- Type: Lucene.Net.Index..::..IndexDeletionPolicy
a custom deletion policy (only used if you use this reader to perform deletes or to set norms); see {@link IndexWriter} for details.
- readOnly
- Type: System..::..Boolean
true if no changes (deletions, norms) will be made with this IndexReader
- termInfosIndexDivisor
- Type: System..::..Int32
Subsambles which indexed terms are loaded into RAM. This has the same effect as {@link IndexWriter#setTermIndexInterval} except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1. Set this to -1 to skip loading the terms index entirely.
Return Value
[Missing <returns> documentation for "M:Lucene.Net.Index.IndexReader.Open(Lucene.Net.Index.IndexCommit,Lucene.Net.Index.IndexDeletionPolicy,System.Boolean,System.Int32)"]