lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Commented] (SOLR-1223) Query Filter fq with OR operator
Date Fri, 07 Sep 2012 20:04:07 GMT


Hoss Man commented on SOLR-1223:

I had an idea about this a while back that i thought i posted as a comment but apparently
i forgot.

what if we implemented a very simple "or" (and for parity: "and") QParser that took as it's
input the _name_ of another (multivalued) param, which it then iterated over, parsing each
one according to the (possibly local) defType and built up a BooleanQuery containing all of
the resulting clauses.  ie...

&fq={!or tag=model}models
&fq={!or tag=color defType=field f=color}colors
&colors=Cherry Red

As alluded to in this example, it would greatly simplify the input handling needed when doing
multi-select faceting

A possible later optimization would be for this OrQParser to actually return a subclass of
BooleanQuery implementing a special interface so that the SOlrIndexSearcher would know if/when
it could pull out the BooleanClauses to cache them individually.

(The one concern i have about this idea is the unusualness of the input to this parser being
the *name* of another (multivalued) param -- people might be confused with the more common
convention of passing as input a dereferenced param -- ie: '{{$param}}'))

> Query Filter fq with OR operator
> --------------------------------
>                 Key: SOLR-1223
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Brian Pearson
> See this [issue|]
for some background.    Today, all of the Query filters specified with the fq parameter are
AND'd together.  
> This issue is about allowing a set of filters to be OR'd together (in addition to having
another set of filters that are AND'd).    The OR'd filters would of course be applied before
any scoring is done.  
> The advantage of this feature is that you will be able to break up complex filters into
simple, more cacheable filters, which should improve performance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message