lucene-java-user mailing list archives

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

I'm using facets with Lucene 5.0 using a WildcardQuery to narrow down my 
results. The TopDocs collected by FacetsCollector.search 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 
DefaultSortedSetDocValuesReaderState(
iSearcher.getIndexReader(), "author_facet );

FacetsCollector fc = new FacetsCollector();
TopDocs topDocs = FacetsCollector.search(iSearcher, query, filter, 1000, 
fc);
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.setIndexFieldName("author_dim","author_facet");
config.setMultiValued("author_dim", true);
What am I missing here?

Thanks for any help,
Andreas


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


Mime
View raw message