public class SolrHelper
extends java.lang.Object
| Constructor and Description |
|---|
SolrHelper(SolrProperties properties)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyCoreConfig(java.lang.String srcName,
java.lang.String targetName)
Copy the conf/ of the source core to the workspace for a new core.
|
java.io.File |
getCoreDataDir(java.lang.String core)
Get the core data dir.
|
java.io.File |
getCoreInstanceDir(java.lang.String core)
Get the core instance dir.
|
java.io.File |
getCoreRootDir(java.lang.String core)
Get the core root dir.
|
java.lang.String |
getDataDirPath(java.lang.String coreName)
Get the path of the data directory relative to solr.home for specified a core.
|
java.io.File |
getSolrConfigByCore(java.lang.String core)
Get the solrconfig.xml by core.
|
java.io.File |
getSolrHome()
Get the solr.home file.
|
java.io.File |
getSolrSchemaByCore(java.lang.String core)
Get the schema.xml by core.
|
java.io.File |
getSolrXML()
Get the solr.xml file.
|
public SolrHelper(SolrProperties properties) throws java.io.IOException
properties - the SolrPropertie.java.io.IOException - IOException.public void copyCoreConfig(java.lang.String srcName,
java.lang.String targetName)
throws java.io.IOException
srcName - the name of the new core.targetName - java.io.IOException - IOException.public java.io.File getCoreRootDir(java.lang.String core)
throws java.io.IOException
core - the core name.java.io.IOException - IOException.public java.io.File getCoreDataDir(java.lang.String core)
throws java.io.IOException
core - the core name.java.io.IOException - IOException.public java.io.File getCoreInstanceDir(java.lang.String core)
throws java.io.IOException
core - the core name.java.io.IOExceptionpublic java.io.File getSolrConfigByCore(java.lang.String core)
throws java.io.IOException
core - the core name.java.io.IOExceptionpublic java.io.File getSolrSchemaByCore(java.lang.String core)
throws java.io.IOException
core - the core name.java.io.IOException - IOException.public java.io.File getSolrHome()
throws java.io.IOException
java.io.IOException - IOException.public java.io.File getSolrXML()
throws java.io.IOException
java.io.IOException - IOException.public java.lang.String getDataDirPath(java.lang.String coreName)
coreName - the core name.