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

[BUG] incorrect distance metric formula for innerproduct in knn scriptscoring #397

Closed
tstadel opened this issue Feb 7, 2022 · 0 comments · Fixed by #1004
Closed

[BUG] incorrect distance metric formula for innerproduct in knn scriptscoring #397

tstadel opened this issue Feb 7, 2022 · 0 comments · Fixed by #1004
Assignees
Labels
3 - Tech review PR: Tech review in progress bug Technical problem with the doc site or broken link
Milestone

Comments

@tstadel
Copy link

tstadel commented Feb 7, 2022

What is the bug?
The formula for the innerproduct distance measure equals the l1 distance metric, not dotproduct. If I get it correctly, innerproduct in scriptscoring is fully supported and correctly uses the dotproduct formula as distance metric (see this PR in opendistro). So this formula should be corrected in order to avoid confusion. Otherwise (if it's actually calculating l1 for innerproduct space_type) there should be an explanation why this is the case.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to knn scriptscoring docs
  2. Scroll down to the distance metric table
  3. See error for innerproduct row.

What is the expected behavior?
Innerproduct formula should equal the dotproduct formula.

@tstadel tstadel added the bug Technical problem with the doc site or broken link label Feb 7, 2022
@tstadel tstadel changed the title [BUG] correct distance metric formula for Innerproduct in scriptscoring [BUG] correct distance metric formula for innerproduct in scriptscoring Feb 7, 2022
@tstadel tstadel changed the title [BUG] correct distance metric formula for innerproduct in scriptscoring [BUG] incorrect distance metric formula for innerproduct in scriptscoring Feb 7, 2022
@tstadel tstadel changed the title [BUG] incorrect distance metric formula for innerproduct in scriptscoring [BUG] incorrect distance metric formula for innerproduct in knn scriptscoring Feb 7, 2022
@Naarcha-AWS Naarcha-AWS self-assigned this Feb 11, 2022
@Naarcha-AWS Naarcha-AWS added the 1 - Backlog Issue: The issue is unassigned or assigned but not started label Aug 19, 2022
@Naarcha-AWS Naarcha-AWS added this to the 2022-Q3 milestone Aug 19, 2022
@Naarcha-AWS Naarcha-AWS added 3 - Tech review PR: Tech review in progress and removed 2 - In progress Issue/PR: The issue or PR is in progress. labels Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Tech review PR: Tech review in progress bug Technical problem with the doc site or broken link
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants