Why does SolrIndexSearcher.java enforce mutual exclusion of filter and filterList?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does SolrIndexSearcher.java enforce mutual exclusion of filter and filterList?

Aaron Daubman
Greetings,

I'm wondering if somebody would please explain why
SolrIndexSearcher.java enforces mutual exclusion of filter and
filterList
(e.g. see: https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L2039
)

For a custom application we have been using this functionality
successfully and I have been maintaining patches against base releases
up from 1.4 through 3.6.1 and am now finally looking at 4.0. Since I
am yet-again revisiting this custom patch, I am wondering why this
functionality is prevented out of the box - for two reasons really:

1) It would be great if I didn't have to maintain a custom internal
branch of solr for this tiny little change
2) I am worried that the purposeful prevention of this functionality
implies there is a downside to doing this.

Is there a downside to utilizing both a DocSet based filter and query
based filterList?
If not, once I migrate this patch to 4.0 what would be the best way to
get this functionality incorporated into the base?

For additional info, you may find the now-2-year-old issue with
patches addressing this up through 3.6.1 here:
https://issues.apache.org/jira/browse/SOLR-2052

Any insight appreciated as always,
     Aaron
Reply | Threaded
Open this post in threaded view
|

Re: Why does SolrIndexSearcher.java enforce mutual exclusion of filter and filterList?

Yonik Seeley-4
On Sun, Oct 21, 2012 at 3:57 PM, Aaron Daubman <[hidden email]> wrote:
> Greetings,
>
> I'm wondering if somebody would please explain why
> SolrIndexSearcher.java enforces mutual exclusion of filter and
> filterList
> (e.g. see: https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L2039
> )

AFAIK, It's only prevented because it's not implemented (or at least
it wasn't in the past.)  Things may have changed since I restructured
filtering to implement post filters though.  If you remove the checks,
does everything actually work today?

It was never implemented because Solr didn't use it itself (and the
vast majority of people use Solr as-is w/o internal customization).
Should be fine to support as long as it doesn't complicate the
implementation too much.

-Yonik
http://lucidworks.com