I have some parent/child data that uses the parent document to store the
document itself (so it has things like document id, title, body, etc) and
then child documents for each parent that each contain a specific user's
rating of that document, which contains user ID and either 1 for "liking"
the document or -1 for "disliking" the document. This numberic value is
stored in the field "userScore"
I want to make a query that will return the documents that are most "liked".
The query below counts the documents with the most number of "votes", it
does not indicate the highest number of "likes". Is there an easy way to do
this that I'm missing? It seems like somewhere there should be a spot for
placing "userScore" : 1;
{
"facets": {
"test_facet": {
"terms": {
"field": "_parent"
}
}
}
}
--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Counts-of-children-in-parent-child-data-tp4049230.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1392047590024-4049230.post%40n3.nabble.com.
For more options, visit https://groups.google.com/groups/opt_out.