-
-
Save plaflamme/3ec53a6ae6a5f6896066 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query": { | |
"bool" : { | |
"must" : [ | |
{"term" : { "a_parent_field" : "a_value" } }, | |
{ | |
"has_child": { | |
"query": { | |
"custom_sore": { | |
"query" : { "match_all":{} }, | |
"script" : "doc['a_child_field'].value" | |
} | |
} | |
} | |
}, | |
"script": "_score[0] / _score[1] * some_constant" | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
script
on themust
clause in thebool
query is what I'm not sure how to achieve. I know that's not legal syntax, but it should convey what I'd like to do. How do we go about doing something like this?