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
function_score should throw exception if decay function is used with multi valued field #3960
Comments
we have a bunch of places where we do similar things like in Sorting we use |
I see. Might make sense. I have a multi valued field with N entries, but it actually represents an N-dim vector. Instead of computing avg, min or max distance, I actually want to give the origin as vector as well and then compute euclidean distance of origin and field vector. In this case the number of values in the field should be the same as the number of values given in the |
Closed this issue. Feel free to open a new issue if you think multiple values should be handled as described above. |
@brwe Unfortunately, the |
…le values" This reverts commit 95d7815. see #3960 (comment)
…le values" This reverts commit f7fc261. see #3960 (comment)
Thanks! I reverted the commits for now. |
@brwe I pushed a commit on how we could solve this - just as an example to start the discussion |
@s1monw That would work I think. |
…le values" This reverts commit 95d7815. see elastic#3960 (comment)
Opened pull request #5940 |
Decay functions currently only use the first value in a field that contains multiple values to compute the distance to the origin. Instead, it should consider all distances if more values are in the field and then use one of min/max/sum/avg which is defined by the user. Relates to #3960 closes #5940
Decay functions currently only use the first value in a field that contains multiple values to compute the distance to the origin. Instead, it should consider all distances if more values are in the field and then use one of min/max/sum/avg which is defined by the user. Relates to #3960 closes #5940
Closing, the issue is fixed by #5940 |
The decay functions for function_score do not handle fields with multiple values. Decay functions silently compute the distance from the first value. This can lead to confusion, as seen in issue #3926. Instead of using the first value in the field, an exception should be thrown if a field has multiple values.
The text was updated successfully, but these errors were encountered: