Hi,
I can get facet counts from a MLT field query. Like below.
{"query":{"mlt_field":{"text":{"like_text":"ministers of
defense","min_term_freq":1,"max_query_terms":12}}},"fields":["id"],"facets":{"entities.people":{"terms":{"field":"entities.people"}}}}
But I'm having trouble constructing a query for those documents. I still
need to use the mlt_field query as its the basis for my facets.
But if I try and add query_string like this:
{"query":{"mlt_field":{"text":{"like_text":"ministers of
defense","min_term_freq":1,"max_query_terms":12}},"query_string":{"fields":["text"],"query":"(entities.people:"government"
OR entities.people:"government") AND
text:"government""}},"fields":["id","locations","ratings"]}
I get a parse error.
What's the trick to add a query or filter to mlt_field? The documentation
doesn't clarify this.
thank you!!!
--
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/a71c9db6-69cc-42f3-ae3f-a727c41e6803%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.