|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.core.IndexReaderFactory
public abstract class IndexReaderFactory
Factory used to build a new IndexReader instance.
Field Summary | |
---|---|
protected int |
termInfosIndexDivisor
|
Constructor Summary | |
---|---|
IndexReaderFactory()
|
Method Summary | |
---|---|
int |
getTermInfosIndexDivisor()
|
void |
init(NamedList args)
Potentially initializes termInfosIndexDivisor . |
abstract DirectoryReader |
newReader(Directory indexDir,
SolrCore core)
Creates a new IndexReader instance using the given Directory. |
abstract DirectoryReader |
newReader(IndexWriter writer,
SolrCore core)
Creates a new IndexReader instance using the given IndexWriter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int termInfosIndexDivisor
Constructor Detail |
---|
public IndexReaderFactory()
Method Detail |
---|
public void init(NamedList args)
termInfosIndexDivisor
. Overriding classes should call super.init() in order
to make sure termInfosIndexDivisor is set.
init
will be called just once, immediately after creation.
The args are user-level initialization parameters that may be specified when declaring an indexReaderFactory in solrconfig.xml
init
in interface NamedListInitializedPlugin
public int getTermInfosIndexDivisor()
termInfosIndexDivisor
public abstract DirectoryReader newReader(Directory indexDir, SolrCore core) throws IOException
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.
IOException
- If there is a low-level I/O error.public abstract DirectoryReader newReader(IndexWriter writer, SolrCore core) throws IOException
This is used for opening the initial reader in NRT mode (nrtMode=true
in solrconfig.xml)
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.
IOException
- If there is a low-level I/O error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |