This functionality will allow for a user to find a particular set of QIDs that match one or another criteria. It will work based on how CirrusSearch implements OR, see more here: https://www.mediawiki.org/wiki/Help:CirrusSearch/Logical_operators#Lucene,_MUST,_and_SHOULD. The haswbstatement keyword already implements this, see more here: https://www.mediawiki.org/wiki/Help:Extension:WikibaseCirrusSearch
After we build it, something like this should be possible:
“citizenship=germany AND field of work=chemistry OR physics AND occupation=scientist” ->
haswbstatement:P27=Q183 haswbstatement:P101=Q2329|P101=Q413 haswbstatement:P106=Q90. It will just not be possible to do this with nesting, the criteria cannot be of the form (A OR (B AND C))