【发布时间】:2015-12-08 18:20:43
【问题描述】:
在 /update 按预期工作的 Solr 5.3.1 安装下,我尝试使用 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 将同时索引文档和相关的分类元数据,并且不需要执行部分更新命令。
【问题讨论】:
标签: solr