public class SolrServerManager extends Object
Modifier and Type | Field and Description |
---|---|
static Map<String,org.apache.solr.client.solrj.SolrServer> |
serverMap |
static String |
SOLR_CORE_MAIN |
static String |
SOLR_HOME |
static String |
SOLR_SERVER_EMBEDDED |
static String |
SOLR_SERVER_STREAMING |
Modifier and Type | Method and Description |
---|---|
protected static org.apache.solr.client.solrj.impl.CommonsHttpSolrServer |
getCommonsHttpSolrServer(String solrUrl) |
protected org.apache.solr.client.solrj.SolrServer |
getEmbeddedSolrServer(String solrCore) |
static SolrServerManager |
getInstance() |
String |
getSolrCoreURL() |
org.apache.solr.client.solrj.SolrServer |
getSolrServer()
Simplest method to get a solr server for the default core.
|
org.apache.solr.client.solrj.SolrServer |
getSolrServer(String solrCore)
Get a solr server for the given core.
|
org.apache.solr.client.solrj.SolrServer |
getSolrServer(String solrCore,
boolean isStreaming,
boolean isEmbedded)
Get a solr server for the given core, with the specified options for streaming or embedded.
|
protected void |
init() |
public static final String SOLR_HOME
public static final String SOLR_CORE_MAIN
public static final String SOLR_SERVER_EMBEDDED
public static final String SOLR_SERVER_STREAMING
public static SolrServerManager getInstance()
protected void init()
public org.apache.solr.client.solrj.SolrServer getSolrServer() throws org.apache.solr.client.solrj.SolrServerException
Exception
- Throws an exception on error.org.apache.solr.client.solrj.SolrServerException
public org.apache.solr.client.solrj.SolrServer getSolrServer(String solrCore) throws org.apache.solr.client.solrj.SolrServerException
solrCore
- Solr core for which server is required.Exception
- Throws an exception on error.org.apache.solr.client.solrj.SolrServerException
public org.apache.solr.client.solrj.SolrServer getSolrServer(String solrCore, boolean isStreaming, boolean isEmbedded) throws org.apache.solr.client.solrj.SolrServerException
solrCore
- Solr core for which server is required.isStreaming
- Indicates whether a streaming server is needed.isEmbedded
- Indicates whether an embedded server is needed.Exception
- Throws an exception on error.org.apache.solr.client.solrj.SolrServerException
public String getSolrCoreURL()
protected static org.apache.solr.client.solrj.impl.CommonsHttpSolrServer getCommonsHttpSolrServer(String solrUrl) throws MalformedURLException
MalformedURLException
protected org.apache.solr.client.solrj.SolrServer getEmbeddedSolrServer(String solrCore) throws IOException, ParserConfigurationException, SAXException, org.apache.solr.client.solrj.SolrServerException
IOException
ParserConfigurationException
SAXException
org.apache.solr.client.solrj.SolrServerException
Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.