qwazr / search

Apache Lucene Microservice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boost and PayloadScoreQuery

explorer11 opened this issue · comments

Hi,

When I wrap a PayloadScoreQuery in a Boost query, I would expect the score from PayloadScoreQuery to be boosted. It isn't the case : the score from the Boost query is the same than the score coming from PayloadScoreQuery.
It isn't the case in Lucene. In Lucene, the score of the PayloadScoreQuery is boosted.

I'm uploading a test case made from com.qwazr.search.query.PayloadScoreQueryTest (see the method testWithBoost)
Regards

PayloadScoreQueryTest.txt

It works. There were an issue in the assertion of the test. The second assertation was checking the first result, and not the new one.

The test has been added in the code base. We took the opportunity to add the support of SpanBoost. Therefore there is two ways to handle the boost now.

https://github.com/qwazr/search/blob/a147f256b70fa6aa7a926e99da36eabe4f93ed46/src/test/java/com/qwazr/search/query/PayloadScoreQueryTest.java

Ok thank you ! I missed something in my test.