Apache Lucene.Net 2.4.0 Class Library API

IndexReader.Open Method (IndexCommit, IndexDeletionPolicy, Boolean)

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.

NOTE: Starting in 3.0 this will return a readOnly IndexReader.

Throws CorruptIndexException if the index is corrupt.

Throws IOException if there is a low-level IO error.

public static IndexReader Open(
   IndexCommit commit,
   IndexDeletionPolicy deletionPolicy,
   bool readOnly
);

Parameters

commit
the commit point to open
deletionPolicy
a custom deletion policy (only used if performing deletes or setting norms)
readOnly
true if no changes (deletions, norms) will be made with this IndexReader

See Also

IndexReader Class | Lucene.Net.Index Namespace | IndexReader.Open Overload List