首页 文章

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

提问于
浏览
0

从以下网址做示例"Testing Index Sharding on Two Local Servers"时我被卡住了: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

请帮助!!

1 回答

  • 0

    使用以下命令:

    D:\K\solr-6.3.0\bin\post -c collection_name D:\K\solr-6.3.0\examp
    le\exampledocs\monitor.xml
    

    将collection_name替换为您的集合名称

相关问题