On 12 March 2014 23:32, Michael Schlenzka <mich...@schlenzka.com> wrote:

> I do not want the sum of all the values of the key-value-pairs. I want to
> boost each document (with a specific key) only with the value for the
> matching key/color (e.g. if searching for documents with blue as color each
> document should be boosted with the value for blue in this document. Am I
> correct, that the sum will give me the sum of all values in the nested
> value fields as score/boost?


This is exactly what my query achieves.  The nested query matches nested
docs which have color=blue, and adds up the value for just those docs.  It
returns this sum as the _score from that query.

The bool query then adds the _score from the nested query to the _score
from the review=test query and returns that as the overall _score per doc.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKRJx9L2izFf1csZmdzce_oSSzcRDW1kttkhkARSEW%3D2YQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to