I’m trying out solr…I get the following error when trying a delete query:
curl http://localhost:8983/solr/update --data-binary '<delete><id>SP2514N</id></delete>'
the error is:
Error 400 missing content stream
Problem accessing /solr/update. Reason: missing content stream
The other answer seems correct but doesn’t explain the reason.
You only need to change the content type you’re using to
text/xml, otherwise curl uses the defaultapplication/x-www-form-urlencodedwith the--data-binaryoption (or-d).You should use the following command:
You might want to add the
commit=trueparameter to the url to immediately issue a commit, otherwise you’ll still see the document you wanted to delete (until the next commit).You can also pass the xml directly within the url via GET like suggested in the other answer, using the
stream.bodyparameter.