Overload List

  NameDescription
Public methodClone()()()()
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 {@link #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.

Public methodClone(Boolean)
Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.

See Also