Search in sources :

Example 1 with SolrClientFactory

use of org.codice.solr.factory.SolrClientFactory in project ddf by codice.

the class SolrClientFactoryImpl method newClient.

@Override
public Future<SolrClient> newClient(String core) {
    notNull(core, "Solr core name cannot be null");
    String clientType = System.getProperty("solr.client", "HttpSolrClient");
    SolrClientFactory factory;
    if ("EmbeddedSolrServer".equals(clientType)) {
        factory = new EmbeddedSolrFactory();
    } else if ("CloudSolrClient".equals(clientType)) {
        factory = new SolrCloudClientFactory();
    } else {
        // Use HttpSolrClient by default
        factory = new HttpSolrClientFactory();
    }
    return newClientFunction.apply(factory, core);
}
Also used : SolrClientFactory(org.codice.solr.factory.SolrClientFactory)

Aggregations

SolrClientFactory (org.codice.solr.factory.SolrClientFactory)1