问题描述
我已经用 Tomcat 安装了 Apache Solr,我的 /solr/admin
工作正常.但是当我尝试发出 /solr/update
时,我收到以下错误.可能是什么原因?
I have installed Apache Solr with Tomcat and my /solr/admin
is working fine. But when I try to issue /solr/update
I am getting the following error. What could be the reason?
org.apache.solr.common.SolrException: 缺少内容流
推荐答案
/solr/update
将查找任何要编入索引的输入文档.运行普通的 /solr/update
将导致此异常,因为它没有输入.运行它的最简单方法是,
/solr/update
will look for any input documents to be indexed. Running plain /solr/update
will cause this exception since there is no input for it. The easiest way to run it is like,
java -Durl=localhost:8080/<your apache solr context path, mostly solr>/update -jar post.jar *.xml
如果您尝试保留空的文档集合,这也可能通过 SolrJ/spring-data-solr 发生.
This can also happen through SolrJ/spring-data-solr if you try to persist an empty collection of documents.
所以 solrClient.add(new ArrayList(), 10000);
也会导致错误.
这篇关于org.apache.solr.common.SolrException:缺少内容流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!