Solr在Https - SolrJ Connection问题上运行 [英] Solr running on Https - SolrJ Connection issue

查看:156
本文介绍了Solr在Https - SolrJ Connection问题上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在tomcat顶部的Https(8443)端口运行Solr,如何使用solrj客户端访问该solr,我只能看到CommonsHttpSolrServer可用,

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,

请问是否有办法使用SolrJ访问启用https端口的solr?

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

推荐答案

Solrj内部使用 Apache Http客户端。当使用 CommonsHttpSolrServer 时,它将创建一个&使用它,如果你没有提供它。

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

在这种情况下,由于您需要SSL支持,您可以将自己的SSL配置HttpClient提供给 CommonsHttpSolrServer 构造函数。检查其 API 接受HttpClient。

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

您可以看到以下指南,介绍如何创建启用SSL的http客户端 SSL指南

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

这应该会有所帮助。

这篇关于Solr在Https - SolrJ Connection问题上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆