public class EmbeddedSolrServerFactory extends Object implements SolrClientFactory, DisposableBean
ResourceUtils, therefore it is possible to place them in classpath. Use this class for Testing. It
is not recommended for production.| Modifier | Constructor and Description |
|---|---|
protected |
EmbeddedSolrServerFactory() |
|
EmbeddedSolrServerFactory(String solrHome) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer |
createPathConfiguredSolrServer(String path) |
void |
destroy() |
List<String> |
getCores() |
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer |
getSolrClient()
Get base
SolrClient instance |
protected void |
initCoreContainer() |
void |
setSolrHome(String solrHome) |
void |
shutdownSolrServer() |
protected EmbeddedSolrServerFactory()
public EmbeddedSolrServerFactory(String solrHome) throws ParserConfigurationException, IOException, SAXException
solrHome - Any Path expression valid for use with ResourceUtils that points to the
solr.solr.home directoryParserConfigurationExceptionIOExceptionSAXExceptionpublic org.apache.solr.client.solrj.embedded.EmbeddedSolrServer getSolrClient()
SolrClientFactorySolrClient instancegetSolrClient in interface SolrClientFactoryprotected void initCoreContainer()
public final org.apache.solr.client.solrj.embedded.EmbeddedSolrServer createPathConfiguredSolrServer(String path) throws ParserConfigurationException, IOException, SAXException
path - Any Path expression valid for use with ResourceUtilsEmbeddedSolrServerParserConfigurationExceptionIOExceptionSAXExceptionpublic void shutdownSolrServer()
public void setSolrHome(String solrHome)
public void destroy()
throws Exception
destroy in interface DisposableBeanExceptionCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.