lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samt & sonders <>
Subject Lucene 5.0: Facet count does ignore results from
Date Thu, 16 Apr 2015 09:55:06 GMT

I'm using facets with Lucene 5.0 using a WildcardQuery to narrow down my 
results. The TopDocs collected by are indeed 
limited by both my query and my filter. But when it comes to counting 
there are suddenly results not matching my WildcardQuery anymore.

SortedSetDocValuesReaderState state = new 
iSearcher.getIndexReader(), "author_facet );

FacetsCollector fc = new FacetsCollector();
TopDocs topDocs =, query, filter, 1000, 
For example: my WildcardQuery was 'Da*' and the TopDocs are containing 
these author fields { "Daeniken", "Dalmas", "Daley" }

Facets facets = new SortedSetDocValuesFacetCounts(state, fc);
FacetResult result = facets.getTopChildren(1000, "author_dim");
For example: At this point I get these authors and counters: { "Daeniken 
(20)", "Murakami (4), "Robertson (2), "Dalmas (1)", "Daley(1)" }. 
Obviously they do not match the results stored in the collector fc anymore.

My FacetConfig looks like this:

FacetsConfig config = new FacetsConfig();
config.setMultiValued("author_dim", true);
What am I missing here?

Thanks for any help,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message