: > : how I can get count of distinct facet_fields ? : > : : > : like numFacetFound in this example: : > : > There's currently no way to do that.
: I need to do the same thing. Any pointers on how one would go about : implementing that? (in Java) Thanks. The change would be in the SimpleFacets class, and there are a couple of differnet code paths to worry about (because two different hueristics are used depending on the field type) but the first step would be to define what the count represents: is it just the number of terms being returned? the number of terms that have a non zero count? or all of the terms in the field? the first and the last are pretty trivial, the middle one requires maintaining a new count as the terms are scanned (and if i'm not mistaken, there's an optimization in there to stop once we know we won't find any terms better then theones we already have, and in order to return that count you'd need to prevent that optimization) -Hoss