Java – Lucene is not a null query?
•
Java
How do we construct a query to search for specific fields that are not empty
field_ Name: * not working I tried field_ Name: [a * to Z *] this applies to English, but not all languages/
Any other suggestions?
Solution
Lucene currently does not support this feature Please refer to this for discussion
An alternative might be to store some predefined strings (such as nullnullnullnull) as field values if it is empty You can then use negative filters to delete these records (I don't like so much, but I can't think of a better choice)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码