Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
It would be useful to have a function query operator (e.g. `isnan`) to check rather a value is a float NaN (not a number).
Examples of use cases:
- Filtering out resulting documents having NaN in a certain field or expression
- Setting values and expressions according to the condition of a field/expression being NaN (`if(isnan(value),0,1)`)
- Replacing NaN by a default value (similar as a coalesce): `if(isnan(value),0,value)`
This function/operator is particularly important considering that the cosine similarity calculated by KNN queries with Dense Vectors might return a NaN on the score depending on the vectors. For an example of a query returning NaN in the response (with the films example):
Attachments
Issue Links
- links to