I'm trying to do create a query to exclude all documents which have an empty/null value in one specific field.
What is the query syntax or the programmatic way to do this?
I'm trying to do create a query to exclude all documents which have an empty/null value in one specific field.
What is the query syntax or the programmatic way to do this?
You can use a required range query, which is open at both sides, like:
+field:[* TO *]
That is probably adequate, assuming that the documents to exclude have no value in the index.
If some form of default value appears, you would have to exclude that value as well, like:
+field:[* TO *] -field:NULL