Example usage for org.apache.solr.client.solrj.impl HttpSolrClient setBaseURL

List of usage examples for org.apache.solr.client.solrj.impl HttpSolrClient setBaseURL

Introduction

In this page you can find the example usage for org.apache.solr.client.solrj.impl HttpSolrClient setBaseURL.

Prototype

public void setBaseURL(String baseURL) 

Source Link

Document

Change the base-url used when sending requests to Solr.

Usage

From source file:com.frank.search.solr.server.support.HttpSolrClientFactory.java

License:Apache License

protected void appendCoreToBaseUrl(String core, SolrClient solrClient) {
    if (StringUtils.isNotEmpty(core) && isHttpSolrClient(solrClient)) {
        HttpSolrClient httpSolrClient = (HttpSolrClient) solrClient;

        String url = SolrClientUtils.appendCoreToBaseUrl(httpSolrClient.getBaseURL(), core);
        httpSolrClient.setBaseURL(url);
    }/*from   w  ww. j  a  v  a 2s  .c  om*/
}