Hi all,
I need help implementing the following code in solarj 8.0.0.

private SolrClient server, adminServer;

this.adminServer = new HttpSolrClient(SolrClientUrl);
this.server = new HttpSolrClient( SolrClientUrl + "/" + mapping.getCoreName() );
if (serverUserAuth) {
  HttpClientUtil.setBasicAuth(
      (DefaultHttpClient) ((HttpSolrClient) adminServer).getHttpClient(),
      serverUsername, serverPassword);
  HttpClientUtil.setBasicAuth(
      (DefaultHttpClient) ((HttpSolrClient) server).getHttpClient(),
      serverUsername, serverPassword);
}


I could get the solarClients as following

this.adminServer = new HttpSolrClient.Builder(SolrClientUrl).build();
this.server = new HttpSolrClient.Builder( SolrClientUrl + "/" +
mapping.getCoreName() ).build();

But i can't find a way to implement basic authentication. I think that it
can be done via SolrHttpClientBuilder.
Can you please help me to solve this?

Thank and regards
Lahiru
-- 
Lahiru Jayasekara
Batch 15
Faculty of Information Technology
University of Moratuwa
0716492170

Reply via email to