开发者

Search for -1 in Solr

开发者 https://www.devze.com 2023-01-02 10:48 出处:网络
I have an optional property of type pfloat, that can either be an encoded开发者_如何学Python numeric value, or -1 if the property is not set. Numerics are encoded to be range searchable (1 is encoded

I have an optional property of type pfloat, that can either be an encoded开发者_如何学Python numeric value, or -1 if the property is not set. Numerics are encoded to be range searchable (1 is encoded to something like 10000000001), but -1 will always be -1.

How can I search a field for -1?

property:-1 throws parse error and property:'-1' doesn't return anything.

Thanks for help!


Use double quotes: property:"-1"


Try:
*:* NOT property:[0 TO *]

0

精彩评论

暂无评论...
验证码 换一张
取 消