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 Lucene
DirectoryReader
.
- See Also:
DirectoryReader.open(Directory)
,
DirectoryReader.open(IndexWriter, boolean)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StandardIndexReaderFactory
public StandardIndexReaderFactory()
newReader
public DirectoryReader newReader(Directory indexDir,
SolrCore core)
throws IOException
- Description copied from class:
IndexReaderFactory
- Creates a new IndexReader instance using the given Directory.
- Specified by:
newReader
in class IndexReaderFactory
- Parameters:
indexDir
- indexDir index locationcore
- SolrCore
instance where this reader will be used. NOTE:
this SolrCore instance may not be fully configured yet, but basic things like
SolrCore.getCoreDescriptor()
, SolrCore.getLatestSchema()
and
SolrCore.getSolrConfig()
are valid.
- Returns:
- An IndexReader instance
- Throws:
IOException
- If there is a low-level I/O error.
newReader
public DirectoryReader newReader(IndexWriter writer,
SolrCore core)
throws IOException
- Description copied from class:
IndexReaderFactory
- Creates a new IndexReader instance using the given IndexWriter.
This is used for opening the initial reader in NRT mode (nrtMode=true
in solrconfig.xml)
- Specified by:
newReader
in class IndexReaderFactory
- Parameters:
writer
- IndexWritercore
- SolrCore
instance where this reader will be used. NOTE:
this SolrCore instance may not be fully configured yet, but basic things like
SolrCore.getCoreDescriptor()
, SolrCore.getLatestSchema()
and
SolrCore.getSolrConfig()
are valid.
- Returns:
- An IndexReader instance
- Throws:
IOException
- If there is a low-level I/O error.
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.