Method Clone
Clone()
Efficiently clones the IndexReader (sharing most internal state).
On cloning a reader with pending changes (deletions, norms), the original reader transfers its write lock to the cloned reader. This means only the cloned reader may make further changes to the index, and commit the changes to the index on close, but the old reader still reflects all changes made up until it was cloned.
Like Reopen(), it's safe to make changes to either the original or the cloned reader: all shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.
Declaration
public virtual Object Clone()
Returns
Type | Description |
---|---|
System.Object |
Clone(Boolean)
Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.
Declaration
public virtual IndexReader Clone(bool openReadOnly)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | openReadOnly |
Returns
Type | Description |
---|---|
IndexReader |