2015-04-08 64 views
0

下午好!没有找到结果插件carrot2 + elasticsearch

你能帮我解决一些错误吗?我有Elasticsearch的旧版本1.3.4,并安装了插件Carrot2 Clustering插件1.7.0。我将Elasticsearch升级到版本1.5.0,并将插件Carrot2 Clustering插件1.8.0升级。

现在我正尝试使用Elasticsearch的插件头在插件carrot2中创建集群。当我在插件头POST写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"]....我没有获得插件头结果内容,在映射我有“消息”,而不是“内容”。

请你解释一下,可能是什么错误?

谢谢:)

回答

0

我刚刚更新了我的ES为1.5.1,一切似乎工作得很好。你能否提供一个文件,其索引和查询不起作用(理想情况下,只能导入索引内容的curl命令)。

0
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":"6282436361932152", "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"]}} 

它返回的消息,用户名,ID,网址的插件,_head,但它并没有返回插件carrot2结果。

我写了正确的查询,你问了吗?