我想要做的是使用 Solr 索引文档。
我已经在 Windows 环境中安装并启动了 Solr 服务器,我正在尝试使用 SolrJ 进行索引。
但是,当我尝试将 solr 文档添加到服务器时,如下所示,它会导致错误
server.add(indexDoc);
错误
Error from server at http://localhost:8983/solr: Expected mime type application/octet-stream but got text/html
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/update. Reason:
<pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
这个问题的可能原因是什么。
最佳答案
我认为 404 错误与您的问题更相关...请参阅:Error 404: Prob accessing /solr/update. Reason: Not Found
您在 URL 中缺少您的集合名称。
关于java - 使用 Solr 索引文档导致预期的 MIME 类型应用程序/八位字节流但得到 text/html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29277972/