我正在使用 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 中使用“自定义”索引类型。
有什么想法我可能在这里做错了吗?
谢谢,