lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject possible bug in SimpleFacets.java?
Date Thu, 03 Jun 2010 18:14:12 GMT
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?

Mike

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


Mime
View raw message