Apache Solr - OR in filter query

krinn picture krinn · Sep 29, 2011 · Viewed 53.5k times · Source

Is it possible to search (with apache Solr) for items which are in one of few categories using filter query, e.g. items in category 'computers' OR 'phones'

When I want to search for items in category computers AND phones I type:

select/?q=...&fq=cat:computers&fq=cat:phones

but it is possible to use OR instead of AND?

Answer

Jayendra picture Jayendra · Sep 29, 2011

You can use

fq=cat:(computers OR phones)