I want to create a script that boosts the scores of documents by a
computed amount. I want to boost the score, not replace it.
The code I tried looks like this (qb is a QueryBuilder built by
qb = new CustomScoreQueryBuilder(qb)
The expected result is that this would multiply all the scores of the
results by 2. (I realize there are better ways to multiply by 2, but I
intend to replace the 2 with a more complex formula once I know it
What happens, instead, is that all the scores for all the hits are set
equal to 2.
If I could access the original score and multiply it myself, I would
do so, but I tried using doc.score to access it and this didn't work
How can I accomplish the desired result?