Kalidoss.M
Kalidoss.M

Reputation: 489

Solr running on Https - SolrJ Connection issue

Am running Solr in Https(8443) port on top of tomcat, How can i access that solr using solrj client, I can see only CommonsHttpSolrServer is availble,

Please suggest is there any way to access the https port enabled solr using SolrJ?.

Upvotes: 5

Views: 4479

Answers (1)

mailboat
mailboat

Reputation: 1077

Solrj internally uses Apache Http Client. When using CommonsHttpSolrServer it will create one & use it, if you are not providing it with one.

In this case since you need support for SSL you could provide your own SSL configured HttpClient to CommonsHttpSolrServer constructor. Check its API that accepts HttpClient.

CommonsHttpSolrServer(String solrServerUrl, HttpClient sslHttpClient, ...

You can see the following guide, on how to create SSL enabled http client SSL Guide.

This should help.

Upvotes: 5

Related Questions