-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add positive_score_impact
support for rank_features
#2726
Conversation
Signed-off-by: Yevhen Tienkaiev <hronom@gmail.com>
Signed-off-by: Yevhen Tienkaiev <hronom@gmail.com>
❌ Gradle Check failure 7d46d7610b431248a2fa850ce48289e8f99d78d3 |
Signed-off-by: Yevhen Tienkaiev <hronom@gmail.com>
❌ Gradle Check failure 0b1326f7d846e8457cc9a053a51e1dcaa64c86c7 |
❌ Gradle Check failure cf7bdc3358fb34d7cdaee10c78d04f8fa48b0c0e |
start gradle check |
Admins please restart build... since failed test completed ok locally and changes also works good here #2725 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will not be releasing 1.4 and 2.0 is feature frozen so the earliest we can merge this will be for 2.1. Let's work on getting it in main first and then we'll autobackport to 2.x.
@@ -84,16 +98,23 @@ public RankFeaturesFieldMapper build(BuilderContext context) { | |||
|
|||
public static final class RankFeaturesFieldType extends MappedFieldType { | |||
|
|||
public RankFeaturesFieldType(String name, Map<String, String> meta) { | |||
private final boolean positiveScoreImpact; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like positiveScoreImpact
is not needed for RankFeaturesFieldType
, the positiveScoreImpact()
is never used
Apologies, I see it being used by final Parameter<Boolean> positiveScoreImpact
. the RankFeaturesFieldType
could drop positiveScoreImpact
and use it from RankFeaturesFieldType
since it has a direct reference to it.
} | ||
|
||
@Override | ||
public RankFeaturesFieldMapper build(BuilderContext context) { | ||
return new RankFeaturesFieldMapper( | ||
name, | ||
new RankFeaturesFieldType(buildFullName(context), meta.getValue()), | ||
new RankFeaturesFieldType(buildFullName(context), meta.getValue(), positiveScoreImpact.getValue()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like either RankFeaturesFieldMapper
or RankFeaturesFieldType
need positiveScoreImpact
, but not both (see please https://github.com/opensearch-project/OpenSearch/pull/2726/files#r841752169)
Please fold the above PR feedback into #2725. We will not be merging this into 1.x since there will be no 1.4 release. |
I'll close this and leave #2725. Once in main we can talk about how far we want to backport it. |
Description
Added support for
positive_score_impact
parameter forrank_features
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.