2015-04-08 94 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結果。

我寫了正確的查詢,你問了嗎?