13

I've followed the solr tutorial and renamed the default collection1 to core1, but when I'm getting error 404 trying to import a XML to solr using the following command:

curl http://127.0.0.1:8983/solr/update --data-binary @monitor.xml -H 'Content-type:application/xml'

Here is the response:

<h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/update. Reason:
<pre>    Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i>

2 Answers 2

26

If you rename the collection to core1 you should be running this command:

curl http://127.0.0.1:8983/solr/core1/update --data-binary @monitor.xml -H 'Content-type:application/xml'

That is, you add the collection name in between "solr" and the action - same thing applies for queries:

http://localhost:8983/solr/core1/select?q=solr&wt=xml
2
  • 1
    Glad to help, if you found the answer useful and addressed your issue kindly accept the answer. Jul 18, 2014 at 17:14
  • 1
    @JohnPetrone, I am getting similar error. I am trying from last 2days. I posted here stackoverflow.com/questions/48838233/… -- Need your help please.
    – Sun
    Feb 19, 2018 at 6:45
3

I was working with SolrNet and I get the same error. What I did was:

  • Run Solr with products: $solr-5.5.0\bin>solr start -e techproducts
  • Change SolrNet Sample App
    • web.config SolrUrl from http://localhost:8983/solr to http://localhost:8983/solr/techproducts
    • Global.asax.cs comment out the call to the method AddInitialDocuments()
  • Run the SolrNet Sample App

Not the answer you're looking for? Browse other questions tagged or ask your own question.