Thanks again. I was hoping for easiest way, but most powerful will have to
do! :-)
Cheers,
-joel
On Tuesday, March 3, 2015 at 3:59:29 AM UTC-5, Jörg Prante wrote:
You are right with function score query. This is surely the most powerful
way to manipulate scores the way you like to do.
Thanks Jörg, that makes sense.
I've made that change and it works but I'm still struggling to have scoring
behave the way I want. I simplified the query in my original post for
clarity. The actual query, with the new flag, is more like this:
{
query: {
bool: {
should: [
I have a query template that currently returns results exactly as desired.
I've been given a requirement to very slightly downrank results that have
an optional boolean field set to True. The intent is to ensure that we
return everything that matches the query, but if multiple records match,
Negative boosts are not supported. The challenge in downranking is that
each boost value will contribute to the score and push docs higher, also
when using very small boost values or negative values. This is not what is
expected.
The trick for successful downranking is to reward all docs that do