-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposition to a solution for boosting score DOWN #3
Comments
Hi, thank you for spotting this issue. In general, we consider three boost modes, PARAM_ONLY, ADDITIVE and MULTIPLICATIVE. What you are suggesting is PARAM_ONLY, as it ignores the score of the boost query and purely considers the score of the parameter. Anyway, from my current point of view, this is anyway the only reasonable option for down boosts, as a must_not does not return a score that could be considered. Therefore, I think your proposal makes a lot of sense. |
Hello, That is the ADDITIVE case for down boosts (...After investing into this case, I would like to propose a solution for DOWN -instructions with ADDITIVE ...). |
I think the term ADDITIVE is misleading. I will change the naming of the different boost options. |
Are you planning to develop the MULTIPLICATIVE case? In my opinon, the current code structure is suitable for ADDITIVE but we should have a different code structure for the MULTIPLICATIVE. |
Querqy in general supports multiplicative boosting, so there should be a Querqy user using this. However, I have not implemented support for this so far as I do not really see the need for this. All multiplicative solutions I have seen so far in the context of retail were really bad. Anyway, this is open source, so if someone still has a need for this, such a feature can simply be contributed. But yes - I guess the Querqy query would be required to be embedded in a FunctionScoreQuery, this would definitely lead to a change in the code structure. Furthermore, I do not know whether this can be done with the existing Solr Query DSL stuff. |
FYI: I will release a fix for the DOWN boosting soon |
But feel free to create an issue for the multiplicative stuff - might become an interesting discussion :) |
ok, thanks |
Hello,
In the Elasticsearch negative values are not allowed in function weight. Thus, if I understand your solution, you want to use must_not in function filter for boosting DOWN score. However, as you mentioned in your document the DOWN -instructions are not yet supported. Here are your current code:
The above code does not work correctly because it generates a query like this:
After investing into this case, I would like to propose a solution for DOWN -instructions with ADDITIVE as following:
The new code generates a query like below:
Here is an unit test:
Given some documents indexed:
When search:
Hope that is enough clear and I am looking forward your reply as soon as possible.
Best regards,
Quoc-Anh
The text was updated successfully, but these errors were encountered: