public abstract class IndexReaderFactory extends Object implements NamedListInitializedPlugin
Constructor and Description |
---|
IndexReaderFactory() |
Modifier and Type | Method and Description |
---|---|
void |
init(NamedList args)
init will be called just once, immediately after creation.
|
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.
|
public void init(NamedList args)
The args are user-level initialization parameters that may be specified when declaring an indexReaderFactory in solrconfig.xml
init
in interface NamedListInitializedPlugin
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
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.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.