下午好!
你能帮我解决一些错误吗?我有旧版本1.3.4的Elasticsearch,并安装了插件Carrot2集群插件1.7.0。我将Elasticsearch升级到1.5.0版本,并将插件Carrot2集群插件升级到1.8.0。
现在我正在尝试使用Elasticsearch的plugin head在插件carrot2中创建集群。当我在plugin head帖子中写http://localhost:9200/name_index/_search_with_clusters时
{"search_request":{"fields":["message", "url"],"query":{"match":{"_all":"play"}},"size":100},"query_hint":"play","algorithm":"lingo","field_mapping":{"message":["fields.message"], "url":["fields.url"]}}
我得到的结果与插件carrot2文档中的示例中描述的结果类似。但是当我尝试在插件carrot2中创建集群时,我得到了“找不到结果”(我尝试了两个不同的索引,结果是一样的)
如果我写{"search_request":{"fields":["CONTENT", "url"]....,我不会得到内容的插件头结果,在映射中我有“消息”而不是“内容”。
你能给我解释一下,这可能是什么错误吗?
谢谢您:)
发布于 2015-04-10 16:20:32
我刚刚将ES更新到1.5.1,一切似乎都很正常。您能否为文件提供不起作用的索引和查询(理想情况下,只会导入索引内容的curl命令)。
发布于 2015-04-11 00:25:59
curl -XPUT 'http://localhost:9200/crypto_test1/message/1/'-d '{"userName":"sirius","message": "Any updates on this? I'd like to offer a 50BTC bounty for implementing bitcoin: URIs in the main client.","id":"62824363619321520123447399604952602615", "url":"https://bitcointalk.org/index.php?topic=5171.0%3Ball"}
curl -XPUT 'http://localhost:9200/crypto_test1/message/2/'-d '{"userName": "sirius","message": "I've started coding this based on Freenet's Library plugin. I'll let you know when I have something that works. Slides from my presentation at Bitcoin Cafe Helsinki: http://www.rvl.io/mmalmi/identifi", "id":"173456646277059498504241103998526335207", "url":"https://bitcointalk.org/index.php?topic=130137.0"}'
curl -XPUT 'http://localhost:9200/crypto_test1/message/3/'-d '{"userName": "Blawpaw","message": "Interview with the Bitcoin Authenticator Development Team http://bitcoinist.net/interview-bitcoin-authenticator-developmentteam/", "id":"132270701711270767638103374518766971434","url":"https://bitcointalk.org/index.php?topic=927838.0"}'
curl -XPUT 'http://localhost:9200/crypto_test1/message/3/'-d '{"userName": "Blawpaw","message": "BitPay Introduces the Bitcore Playground http://bitcoinist.net/bitpay-introduces-bitcore-playground/", "id":"47851523789233207364389394815669084579","url":"https://bitcointalk.org/index.php?topic=956260.0"}'此查询不起作用:
{"search_request":{"fields":["message", "url","id","userName"],"query":{"match":"_all":"bitcoin"}},"size":100},"query_hint":"bitcoin","algorithm":"lingo","field_mapping":{"message":["fields.message"], "url":["fields.url"],"userName":["fields.userName"],"id":["fields.id"]}}它在插件_head中返回message,userName,id,url,但在插件carrot2中不返回结果。
我是否写对了您要求的查询?
发布于 2020-03-20 14:58:05
json_data = json.dumps({
"search_request": {
"_source" : [
"field1"
],
"size": 30
},
"field_mapping": {
"title": ["_source.field1"]
},
"query_hint": "",
"algorithm": "lingo"
})
r = requests.post("http://localhost:9200/esindexName/_search_with_clusters", data=json_data, headers={'Content-Type':'application/json'})
#print(r.text)
clusterList = json.loads(r.text)['clusters']https://stackoverflow.com/questions/29513502
复制相似问题