错误405 HTTP方法在SOLR中进行索引时,此URL不支持POST

时间:2016-11-28 09:41:11

标签: solr

我在执行示例时遇到困难 - “在两个本地服务器上测试索引分片”来自以下网址:https://cwiki.apache.org/confluence/display/solr/Distributed+Search+with+Index+Sharding

现在,为了编制索引,我将提供以下命令 - D:\K\solr-6.3.0\bin>java -Dtype=text/csv -Durl=http://localhost:8983/solr/#/core 1/update -jar D:\K\solr-6.3.0\example\exampledocs\post.jar D:\K\solr-6.3.0\examp le\exampledocs\monitor.xml

&安培;我收到了以下错误 -

D:\K\solr-6.3.0\bin>java -Dtype=text/csv -Durl=http://localhost:8983/solr/#/core
1/update -jar D:\K\solr-6.3.0\example\exampledocs\post.jar D:\K\solr-6.3.0\examp
le\exampledocs\monitor.xml
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/#/core1/update using cont
ent-type text/csv...
POSTing file monitor.xml to [base]
SimplePostTool: WARNING: Solr returned an error #405 (HTTP method POST is not su
pported by this URL) for url: http://localhost:8983/solr/#/core1/update
SimplePostTool: WARNING: Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 405 HTTP method POST is not supported by this URL</title>
</head>
<body><h2>HTTP ERROR 405</h2>
<p>Problem accessing /solr/index.html. Reason:
<pre>    HTTP method POST is not supported by this URL</pre></p>
</body>
</html>
SimplePostTool: WARNING: IOException while reading response: java.io.IOException
: Server returned HTTP response code: 405 for URL: http://localhost:8983/solr/#/
core1/update
1 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/#/core1/update...
Time spent: 0:00:00.117

请帮助!!

2 个答案:

答案 0 :(得分:0)

使用以下命令:

getMap().setOnMarkerClickListener(mClusterManager);

将collection_name替换为您的集合名称

答案 1 :(得分:0)

您要放置的url包含#(锚标记),使用常规连接将不会遍历该URL。只需将其删除,然后尝试将网址作为

http://localhost:8983/solr/core1/update