Package org.apache.solr.core
Class StandardIndexReaderFactory
- java.lang.Object
-
- org.apache.solr.core.IndexReaderFactory
-
- org.apache.solr.core.StandardIndexReaderFactory
-
- All Implemented Interfaces:
NamedListInitializedPlugin
public class StandardIndexReaderFactory extends IndexReaderFactory
Default IndexReaderFactory implementation. Returns a standard LuceneDirectoryReader.- See Also:
DirectoryReader.open(Directory)
-
-
Constructor Summary
Constructors Constructor Description StandardIndexReaderFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.index.DirectoryReadernewReader(org.apache.lucene.index.IndexWriter writer, SolrCore core)Creates a new IndexReader instance using the given IndexWriter.org.apache.lucene.index.DirectoryReadernewReader(org.apache.lucene.store.Directory indexDir, SolrCore core)Creates a new IndexReader instance using the given Directory.-
Methods inherited from class org.apache.solr.core.IndexReaderFactory
init
-
-
-
-
Method Detail
-
newReader
public org.apache.lucene.index.DirectoryReader newReader(org.apache.lucene.store.Directory indexDir, SolrCore core) throws IOExceptionDescription copied from class:IndexReaderFactoryCreates a new IndexReader instance using the given Directory.- Specified by:
newReaderin classIndexReaderFactory- Parameters:
indexDir- indexDir index locationcore-SolrCoreinstance where this reader will be used. NOTE: this SolrCore instance may not be fully configured yet, but basic things likeSolrCore.getCoreDescriptor(),SolrCore.getLatestSchema()andSolrCore.getSolrConfig()are valid.- Returns:
- An IndexReader instance
- Throws:
IOException- If there is a low-level I/O error.
-
newReader
public org.apache.lucene.index.DirectoryReader newReader(org.apache.lucene.index.IndexWriter writer, SolrCore core) throws IOExceptionDescription copied from class:IndexReaderFactoryCreates a new IndexReader instance using the given IndexWriter.This is used for opening the initial reader in NRT mode
- Specified by:
newReaderin classIndexReaderFactory- Parameters:
writer- IndexWritercore-SolrCoreinstance where this reader will be used. NOTE: this SolrCore instance may not be fully configured yet, but basic things likeSolrCore.getCoreDescriptor(),SolrCore.getLatestSchema()andSolrCore.getSolrConfig()are valid.- Returns:
- An IndexReader instance
- Throws:
IOException- If there is a low-level I/O error.
-
-