more_like_this POST/JSON equivalent of GET


(aleemb) #1

My first day with ElasticSearch and it's wonderful.

The following query works fine:

curl -XGET '
http://localhost:9200/demo/news/1177421/_mlt?mlt_fields=title,content&fields=id&min_doc_freq=1&pretty=true
'

But the following returns incorrect results:

curl -XPOST 'http://localhost:9200/demo/news/1177421/_mlt' -d '{
"query":
{
"more_like_this" : {
"fields": ["title", "content"],
"ids": ["1177421"],
"min_doc_freq": 1
}
},
"fields":["id", "title"]
}'

What am I missing?

My goal is to get results with just the id/title of the related posts.

Aleem

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CA%2B%3DUhp-wckn4n%3DcnVBjx-P0WE2fhORv86B7S_1UoXSQA%2BFewTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2