SolrJ 客户端使用的 Solr 服务器(Solr 4.0)的默认地址是什么 [英] What is the default address of Solr Server (Solr 4.0) for use from a SolrJ client

查看:30
本文介绍了SolrJ 客户端使用的 Solr 服务器(Solr 4.0)的默认地址是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 SolrJ 客户端连接 Solr 服务器,但它给出了 HTTPResponse 异常.

I'm trying to connect with Solr Server from a SolrJ client, but it gives an HTTPResponse Exception.

这是我的代码:

SolrServer server = new HttpSolrServer("http://"localhost":8983/solr/");

这是一个例外:

java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException:

java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException:

Solr 有默认地址吗?在哪里可以找到?

Does Solr have a default address? Where can you find it?

推荐答案

我对 SolrJ 不熟悉 - 但端点对我来说似乎缺少核心名称.

I am not familiar with SolrJ - but the endpoint seems to be missing the core name to me.

您需要将 Solr 客户端指向特定的核心.

You would need to point your Solr client to a particular core.

核心的 URI 看起来像这样(用于重新加载核心命令)

The URI for the core would look like this (for reloading core command)

http://localhost:8983/solr/{{solrCoreName}}

管理用户界面应该可以在

The admin UI should be accessible at

http://localhost:8983/solr

这篇关于SolrJ 客户端使用的 Solr 服务器(Solr 4.0)的默认地址是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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