Reputation: 1
Good afternoon!
Can you help me please with some error? I had old version 1.3.4 of Elasticsearch and installed plugin Carrot2 Clustering plugin 1.7.0. I upgraded Elasticsearch to version 1.5.0 and plugin Carrot2 Clustering plugin 1.8.0.
Now I'm trying to create cluster in plugin carrot2 using plugin head of Elasticsearch. When I write in plugin head 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"]}}
I get results similar to results, that is described in examples in documentation in plugin carrot2. But when I try to create cluster in plugin carrot2, I get "no results found" (I tried with two different indexes and there is the same situation)
If I write {"search_request":{"fields":["CONTENT", "url"]....
I don't get in plugin head results with content, in mapping I have "message" instead "content".
Could you explain me please, what mistake it can be?
Thank you :)
Upvotes: 0
Views: 182
Reputation: 198
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']
Upvotes: 0
Reputation: 1
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"}'
This query doesn't work :
{"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"]}}
It returns message, userName, id, url in plugin _head, but it doesn't return results in plugin carrot2.
Did I write right queries, that you asked for?
Upvotes: 0
Reputation: 168
I've just updated my ES to 1.5.1 and everything seems to be working just fine. Could you provide a file with your index and query that doesn't work (ideally curl commands that would just import the content of the index).
Upvotes: 0