lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Filter Query or Query
Date Mon, 10 Nov 2014 11:38:14 GMT
Filter queries are the right thing to use here.  It allows the filters to cache separately
from the query and will provide, possibly dramatic, performance improvements.  Don't worry
about the caching concern - you'll have far fewer caches when the filter constraints are separate
from the user query. 


> On Nov 10, 2014, at 05:01, Bram Van Dam <> wrote:
> Hi folks,
> I have an index with hundreds of millions of documents, which users can query in various
> Two index fields are used by the system to hide certain documents from certain users
(for instance: Department A can only view documents belonging to Department A, but not Department
> We're currently doing something like this:
> query = userQuery AND department:userDepartment
> I'm wondering if perhaps a filter query might be a better fit?
> query = userQuery
> filterQuery = department:userDepartment
> This feels a lot cleaner, but I'm worried about the performance implications. Some users
have access to all documents, which might be a bit painful for the filter cache? Or am I missing
> Thanks,
> - Bram

View raw message