lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: possible bug in SimpleFacets.java?
Date Thu, 03 Jun 2010 18:40:00 GMT
On Thu, Jun 3, 2010 at 2:14 PM, Michael McCandless
<lucene@mikemccandless.com> wrote:
> While working on LUCENE-2380 I think I found a bug in
> SimpleFacets.java -- it would not use directExecutor when threads==0.
>
> Here's a patch to fix it:
>
> --- solr/src/java/org/apache/solr/request/SimpleFacets.java     (revision 951028)
> +++ solr/src/java/org/apache/solr/request/SimpleFacets.java     (working copy)
> @@ -274,7 +274,7 @@
>           PerSegmentSingleValuedFaceting ps = new
> PerSegmentSingleValuedFaceting(searcher, base, field, offset,limit,
> mincount, missing, sort, prefix);
>           Executor executor = threads==0 ? directExecutor : facetExecutor;
>           ps.setNumThreads(threads);
> -          counts = ps.getFacetCounts(facetExecutor);
> +          counts = ps.getFacetCounts(executor);
>         } else {
>           counts = getFieldCacheCounts(searcher, base, field,
> offset,limit, mincount, missing, sort, prefix);
>         }
>
> Does that fix look right?

Yep.. good catch!

-Yonik
http://www.lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message