RedisFilterOperator.NE: "(-@%s:[%f %f])",
        RedisFilterOperator.GT: "@%s:[(%f +inf]",
        RedisFilterOperator.LT: "@%s:[-inf (%f]",
        RedisFilterOperator.GE: "@%s:[%f +inf]",
        RedisFilterOperator.LE: "@%s:[-inf %f]",
    }
    def __str__(self) -> str:
        """Return the Redis Query syntax for a Numeric filter expression"""
        if not self._value:
            raise ValueError(
                f"Operator must be used before calling __str__. Operators are "
                f"{self.OPERATORS.values()}"
            )
        if (
            self._operator == RedisFilterOperator.EQ
            or self._operator == RedisFilterOperator.NE
        ):
            return self.OPERATOR_MAP[self._operator] % (
                self._field,
                self._value,
                self._value,
            )
        else:
            return self.OPERATOR_MAP[self._operator] % (self._field, self._value)
    @check_operator_misuse
    def __eq__(self, other: Union[int, float]) -> "RedisFilterExpression":
        """Create a Numeric equality filter expression
        Args:
            other (Number): The value to filter on.
        Example:
            >>> from langchain.vectorstores.redis import RedisNum
            >>> filter = RedisNum("zipcode") == 90210
        """
        self._set_value(other, Number, RedisFilterOperator.EQ)
        return RedisFilterExpression(str(self))
    @check_operator_misuse
    def __ne__(self, other: Union[int, float]) -> "RedisFilterExpression":
        """Create a Numeric inequality filter expression