Skip to content
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 to rank_features type #69994

Merged

Conversation

mayya-sharipova
Copy link
Contributor

rank_features field type misses positive_score_impact parameter
that rank_feature type has. This adds this parameter.

Closes #68619

@mayya-sharipova mayya-sharipova added the :Search/Search Search-related issues that do not fall into other categories label Mar 4, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Mar 4, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@mayya-sharipova mayya-sharipova added v8.0.0 v7.13.0 and removed Team:Search Meta label for search team labels Mar 4, 2021
@mayya-sharipova mayya-sharipova force-pushed the rank_features_positive_impact branch from 105423f to ebc0ca0 Compare March 4, 2021 19:14
rank_features field type misses positive_score_impact parameter
that rank_feature type has. This adds this parameter.

Closes elastic#68619
@mayya-sharipova mayya-sharipova force-pushed the rank_features_positive_impact branch from ebc0ca0 to 2e4ccf9 Compare March 4, 2021 19:55
@mayya-sharipova
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/bwc

@cbuescher cbuescher self-requested a review March 9, 2021 15:04
Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty similar to what rank_featuredoes, nice to get some insight how this is working. LGTM

@mayya-sharipova mayya-sharipova merged commit 1de0b61 into elastic:master Mar 10, 2021
@mayya-sharipova mayya-sharipova deleted the rank_features_positive_impact branch March 10, 2021 19:55
mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this pull request Mar 10, 2021
rank_features field type misses positive_score_impact parameter
that rank_feature type has. This adds this parameter.

Backport for elastic#69994
Closes elastic#68619
mayya-sharipova added a commit that referenced this pull request Mar 11, 2021
rank_features field type misses positive_score_impact parameter
that rank_feature type has. This adds this parameter.

Backport for #69994
Closes #68619
@jpountz
Copy link
Contributor

jpountz commented Mar 18, 2021

I had left it out on purpose on the first release of rank_features because my mental model is that rank_features is about sparse features. In that situation, positive_score_impact:false doesn't work well because it would contribute a higher score to a document that has the feature than to a document that doesn't have the feature, which feels a bit counter-intuitive? The example works around this problem by setting the same features on all documents but if this is something that is possible, I wonder if users wouldn't naturally go to rank_feature instead?

@mayya-sharipova
Copy link
Contributor Author

mayya-sharipova commented Mar 22, 2021

@jpountz Thank you for the feedback, it makes sense, but it looks to me this should be clarified in the documentation.

by setting the same features on all documents but if this is something that is possible, I wonder if users wouldn't naturally go to rank_feature instead

But for the rank_feature field type as well, we don't enforce that all documents have this field. And similarly, if this field is used in the rank_feature query as a part of should bool query, a doc that has this feature will have a higher score than a doc that doesn't have.

Or are we implicitly expecting that all docs must have rank_feature field?

@jpountz
Copy link
Contributor

jpountz commented Apr 14, 2021

+1 to clarify the documentation and recommend that rank_feature fields have a value for every document that matches the query when positive_score_impact is set to false.

mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this pull request Apr 18, 2021
Add a warning about consequences of negative score impact
for documents that don't have values for rank_feature(s)
fields.

Related to elastic#69994
mayya-sharipova added a commit that referenced this pull request Apr 20, 2021
Add a warning about consequences of negative score impact
for documents that don't have values for rank_feature(s)
fields.

Related to #69994
mayya-sharipova added a commit that referenced this pull request Apr 20, 2021
Add a warning about consequences of negative score impact
for documents that don't have values for rank_feature(s)
fields.

Related to #69994
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

positive_score_impact does not work with rank_features field
6 participants