我正在使用SolrJ 6.2.1并试图在WebSolr索引上创建一个文档,但是当我试图将文档添加到索引时,我仍然会得到以下错误。
错误:来自https://index.websolr.com/solr/XXXXXXX服务器的错误:无效的UTF-8中间字节0xe0 (字符#1,字节#-1)
下面是我为创建索引而编写的SolrJ代码:
String urlString = "https://index.websolr.com/solr/a056f416ce0";
SolrClient solr = new HttpSolrClient.Builder(urlString).build();
SolrInputDocument document = new SolrInputDocument();
document.addField("id", "552199");
UpdateResponse response = solr.add(document);
solr.commit();在最初设置索引时,我还在WebSolr中使用“自定义”索引类型。
知道我在这里做错了什么吗?
谢谢,
发布于 2016-10-28 13:15:00
使用HTTP请求:
https://index.websolr.com/solr/admin/info/system
使用admin/passwd可以检索服务器配置,结构的lucene键包含版本号。
例如,使用json输出:
https://index.websolr.com/solr/admin/info/system?wt=json
lucene: {
solr-spec-version: "4.10.2",
solr-impl-version: "4.10.2 1634293 - mike - 2014-10-26 05:56:21",
lucene-spec-version: "4.10.2",
lucene-impl-version: "4.10.2 1634293 - mike - 2014-10-26 05:51:56"
}所以您应该使用SolrJ ver。4.10.2
发布于 2016-10-27 19:42:22
想出了这个办法。
此时,WebSolr要求您在SolrJ 3.6.1上查询或索引客户端应用程序。
https://stackoverflow.com/questions/40291503
复制相似问题