org.apache.solr.common.SolrException: missing content stream

前端 未结 2 1697
北海茫月
北海茫月 2021-01-04 23:49

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

相关标签:
2条回答
  • 2021-01-05 00:13

    /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
    

    This can also happen through SolrJ/spring-data-solr if you try to persist an empty collection of documents.

    So solrClient.add(new ArrayList<SolrInputDocument>(), 10000);

    would also cause the error.

    0 讨论(0)
  • 2021-01-05 00:31

    If you add commit parameter i.e. ?commit=true, it will work

    0 讨论(0)
提交回复
热议问题