user680244
user680244

Reputation: 175

Concatenation of Solr fq queries

I have what seems at first blush to be a simple problem, but I can't get meaningful Solr results from a two part query.

I want to return all records which either have no roles at all, or a specific role.

Entering role:admin brings me back all the records with a a role:admin tag, -role:* bring me back all records with no roles assigned at all, but role:admin OR -role:* brings back nothing.

Upvotes: 2

Views: 710

Answers (1)

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99750

Try role:admin OR (*:* -role:[* TO *])

Upvotes: 4

Related Questions