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

I installed Apache Solr with Tomcat, and my /solr/admin working fine. But when I try to release /solr/update , I get the following error. What could be the reason?

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

+8
solr
source share
2 answers

/solr/update will look for any input documents for indexing. Running plain /solr/update will throw this exception, since there is no input for it. The easiest way to run this 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 save an empty collection of documents.

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

will also result in an error.

+6
source share

If you add the commit parameter ie ?commit=true , it will work

+10
source share

All Articles