Solr - How do I construct a query that requires a NULL or EMPTY Location field

Viewed 20

I have to get all items where the field "allowedChannels_string_mv" is empty or null. I tried to add "(allowedChannels_string_mv:'')" as a filter raw query but it doesn't works

What is the query syntax to perform the NULL or EMPTY check on a Location field?

1 Answers

You can use the following syntax in your q parameter:

NOT allowedChannels_string_mv:*

which translates to allowedChannels_string_mv does not have any value.

Related