K.He
K.He

Reputation: 137

Solr OR returns no results on valid subqueries

I have a Solr query that looks up docs that have no values for a field/field does not exist AND fields that contain values from a given set (A OR B OR C).

What I came up with was (-field:[* TO *] OR field:(A OR B OR C)). Each subquery returns expected results but combining the two with an OR returns me nothing. Is there another way to express this?

Upvotes: 1

Views: 135

Answers (1)

alexf
alexf

Reputation: 1301

According to this topic, you can add parenthesis and try something like:

(-field:[* TO *]) OR (field:(A OR B OR C))

Upvotes: 1

Related Questions