Solr running on Https - SolrJ Connection issue

感情迁移 提交于 2019-11-28 08:05:42

问题


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?.


回答1:


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.



来源:https://stackoverflow.com/questions/9068759/solr-running-on-https-solrj-connection-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!