On Thu, Aug 27, 2015 at 12:22 PM, Joel Bernstein <[email protected]> wrote: > > I've been working on some performance tuning for Alfresco and found that the > main query is being executed in the first and second phase of distributed > search when there are facet refinements. > > The code where this happens is in line 347 of the QueryComponent (trunk). > > This turns out be pretty expensive in Alfresco's use case. > > We already have this DocSet in the first phase but we currently don't cache > DocSets for facets. > > Perhaps it's time to consider doing this. > > Anybody have any thoughts or objections?
Hmmm, so we cache the filters, but we don't cache the set for the main query. If we did, then there would just be the cost of intersecting those (which is very fast). Of course, that doesn't work for post filters. Easiest might be to wrap up the query+filters as a single query and reuse the existing filter cache if you know it's going to be needed in the second phase. -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
