On Fri, Jun 5, 2009 at 5:33 PM, Yao Ge <yao...@gmail.com> wrote:
> If I want use OR operator with mutile query filters, I can do:
> fq=popularity:[10 TO *] OR section:0
> Is there a more effecient alternative to this?

There is not currently a more efficient way to do this.   But esp with
multi-select support now in Solr, it starts making more sense to
figure out a way to support "OR" filters.

Possible future solutions... (stuff that belongs on solr-dev)
one could perhaps that the parts of a boolean query be cached separately:
fq={!cache=sep}fq=popularity:[10 TO *] OR section:0

Or, we could even support specifying the "OR" clauses separately,
correlating them with a tag:
fq={!grp=a}fq=popularity:[10 TO *]
fq={!grp=a}section:0

If we want the latter, we need to keep in mind how it would interact
with excluding certain filters during faceting... i.e. one part could
be excluded and the other part not.  Seems doable though.

The other part of the puzzle is how to pass this info around (for
example, search routines take a List<Query> for filters).  Perhaps the
easiest way is to create a SolrQuery class that wraps a query and
gives extra processing instructions such as caching the clauses
separately.

-Yonik
http://www.lucidimagination.com

Reply via email to