开发者

Search for -1 in Solr

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜