在Solr 5.3.1中索引.tar.gz文件:不支持HTTP错误405 POST

时间:2015-12-08 18:20:44

标签: solr

在Solr 5.3.1安装下,/ update按预期工作,我尝试使用update / extract查询处理程序索引.tar.gz文件,

curl "http://localhost:8983/solr/#/myfirstcore/update/extract?literal.id=adocument&commit=true" -H 'Content-type:application/octet-stream' --data-binary "@encapsulate.tar.gz"

但是收到以下内容,

<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/admin.html. Reason:
<pre>    HTTP method POST is not supported by this URL</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

在管理面板下,更新/提取规范是

/update/extract
class:org.apache.solr.handler.extraction.ExtractingRequestHandler
version:5.3.1
description:Add/Update Rich document
src:null

并且通常根据以下方向安装solr:Digital Ocean: Installing Solr 5.2.1 on Ubuntu 14.4

鉴于上述错误消息,如何配置Solr索引压缩文件(包括.tar.gz)?用例是将内容与以json格式存储的分类法元数据相关联,将它们压缩在一起。这样,Solr将索引文档和相关的分类法元数据,并且不需要按照部分更新命令进行索引。

1 个答案:

答案 0 :(得分:0)

解决方案,改变:

curl "http://localhost:8983/solr/#/myfirstcore/update/extract?literal.id=adocument&commit=true" -H 'Content-type:application/octet-stream' --data-binary "@encapsulate.tar.gz"

curl "http://localhost:8983/solr/myfirstcore/update/extract?literal.id=adocument&commit=true" -H 'Content-type:application/octet-stream' --data-binary "@encapsulate.tar.gz"

对id = adocument的查询返回1次点击。它没有拿起田地是一个单独的问题。