Java org.apache.lucene.index DirectoryReader fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.index DirectoryReader fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.index DirectoryReader.

The text is from its open source code.

Subclass

org.apache.lucene.index.DirectoryReader has subclasses.
Click this link to see all its subclasses.

Field

Directorydirectory
The index directory.

Method

IndexCommitgetIndexCommit()
Expert: return the IndexCommit that this reader has opened.
longgetVersion()
Version number when this IndexReader was opened.
booleanindexExists(Directory directory)
Returns true if an index likely exists at the specified directory.
booleanisCurrent()
Check whether any new changes have occurred to the index since this reader was opened.
ListlistCommits(Directory dir)
Returns all commit points that exist in the Directory.
DirectoryReaderopen(final Directory directory)
Returns a IndexReader reading the index in the given Directory
DirectoryReaderopen(final IndexWriter writer)
Open a near real time IndexReader from the org.apache.lucene.index.IndexWriter .
DirectoryReaderopen(final IndexCommit commit)
Expert: returns an IndexReader reading the index in the given IndexCommit .
DirectoryReaderopen(final Directory directory, final Map readerAttributes)
Returns a IndexReader reading the index in the given Directory
DirectoryReaderopen(final IndexCommit commit, Map readerAttributes)
Expert: returns an IndexReader reading the index in the given IndexCommit .
DirectoryReaderopen(final IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes)
Expert: open a near real time IndexReader from the org.apache.lucene.index.IndexWriter , controlling whether past deletions should be applied.
DirectoryReaderopenIfChanged(DirectoryReader oldReader)
If the index has changed since the provided reader was opened, open and return a new reader; else, return null.
DirectoryReaderopenIfChanged(DirectoryReader oldReader, IndexWriter writer, boolean applyAllDeletes)
Expert: Opens a new reader, if there are any changes, controlling whether past deletions should be applied.
DirectoryReaderopenIfChanged(DirectoryReader oldReader, IndexCommit commit)
If the IndexCommit differs from what the provided reader is searching, open and return a new reader; else, return null.
DirectoryReaderopenIfChanged(DirectoryReader oldReader, IndexWriter writer)
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).