xml 错误 404:Prob 访问 /solr/update。原因:未找到
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24654957/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error 404: Prob accessing /solr/update. Reason: Not Found
提问by andrade
I've followed the solr tutorialand renamed the default collection1 to core1, but when I'm getting error 404 trying to import a XML to solr using the following command:
我遵循了solr 教程并将默认 collection1 重命名为 core1,但是当我尝试使用以下命令将 XML 导入 solr 时遇到错误 404:
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>
回答by John Petrone
If you rename the collection to core1 you should be running this command:
如果您将集合重命名为 core1,您应该运行以下命令:
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:
也就是说,您在“solr”和操作之间添加集合名称 - 同样的事情适用于查询:
http://localhost:8983/solr/core1/select?q=solr&wt=xml
回答by Jaider
I was working with SolrNet and I get the same error. What I did was:
我在使用 SolrNet 时遇到了同样的错误。我所做的是:
- Run Solr with products:
$solr-5.5.0\bin>solr start -e techproducts - Change SolrNet Sample App
- web.config
SolrUrlfromhttp://localhost:8983/solrtohttp://localhost:8983/solr/techproducts - Global.asax.cscomment out the call to the method
AddInitialDocuments()
- web.config
- Run the SolrNet Sample App
- 使用产品运行 Solr:
$solr-5.5.0\bin>solr start -e techproducts - 更改 SolrNet 示例应用程序
- web.config
SolrUrl从http://localhost:8983/solr到http://localhost:8983/solr/techproducts - Global.asax.cs注释掉对方法的调用
AddInitialDocuments()
- web.config
- 运行 SolrNet 示例应用程序

