You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a query like this, where I want the 1977 results to come first, and then the 1978 and 1976 results next, and the the 1975 and 1979 results last:
I use this kind of trick all the time (it's very common in the higher-education domain), and it depends on absolute values for int & long values, so your pull request is going to break my code.
Wouldn't it make more sense to just throw a 400 BAD REQUEST when the query tries to do abs(Integer.MIN_VALUE) instead of removing the function entirely for integral types?
The text was updated successfully, but these errors were encountered:
@benjismith I just tested this locally, forbidding Math.abs(...) in forbiddenapis does not prevent you from using it in scripts, I believe the forbiddenapis check is only during Elasticsearch compilation time.
I just reviewed the pull request #5562 and I strongly disagree with the change.
I'm currently using this feature to implement _delta_ sorting. For example, given these documents:
Consider a query like this, where I want the 1977 results to come first, and then the 1978 and 1976 results next, and the the 1975 and 1979 results last:
I use this kind of trick all the time (it's very common in the higher-education domain), and it depends on absolute values for int & long values, so your pull request is going to break my code.
Wouldn't it make more sense to just throw a 400 BAD REQUEST when the query tries to do abs(Integer.MIN_VALUE) instead of removing the function entirely for integral types?
The text was updated successfully, but these errors were encountered: