redis-om-python icon indicating copy to clipboard operation
redis-om-python copied to clipboard

Set membership (IN, contains) not working for numeric types

Open doc-hex opened this issue 3 years ago • 1 comments

in FindQuery.resolve_value() the case for Operators.IN and Operators.NOT_IN is not considered.

  • result is syntax error
  • recommend having an else: raise ValueError on this sort of case statement code

doc-hex avatar Dec 21 '22 18:12 doc-hex

Related concern: how do I search for a range of numeric values?

  • doing field >= 200 and field < 213 works, but is done as:

    NUMERIC {200.000000 <= @kind <= inf} NUMERIC {-inf <= @kind <= 213.000000}

  • when I can do it manually and get it explained as:

    NUMERIC {200.000000 <= @kind <= 213.000000}

Maybe there is no difference in execute time.

doc-hex avatar Dec 21 '22 19:12 doc-hex