[
https://issues.apache.org/jira/browse/LUCENE-4985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-4985:
-------------------------------
Attachment: LUCENE-4985.patch
Patch addresses the following:
* Added FacetRequest.createFacetsAggregator(FacetIndexingParams). All requests
implement it except RangeFacetRequest which returns null. The method is
abstract and documents that you are allowed return null.
* TaxonomyFacetsAccumulator: if a FacetRequest returns null from
createFacetsAggregator, it throws an exception. Otherwise, it groups the
requests into category lists as well as ensures that categories are not over
counted. It uses MultiFacetsAggregator (new) and PerCategoryListAggregator
(existing) to achieve that.
** That allows passing a combination of requests, e.g. Count(A), Count(B),
Count(C), SumScore(A), SumScore(F), SumIntAssociation(D)... and works correctly
when e.g. A+B were indexed in the same category list, but C, D and F weren't.
* Added FacetsAccumulator.create() variants which support RangeAccumulator and
either TaxonomyFacetsAccumulator or SortedSetDocValuesAccumulator. Differences
are in the methods signatures.
** Renamed RangeFacestAccumulatorWrapper to MultiFacetsAccumulator. Also, the
FacetResults are returned in the order of the given accumulators.
** FacetsAccumulator.create documents that you may receive List<FacetResult> in
a different order than you passed in, guaranteeing that all RangeFacetRequests
come last.
* Modified DrillSideways to take either TaxonomyReader or
SortedSetDVReaderState because otherise it cannot be used with SortedSetDV
facets. Mike, can you please review it?
These changes simplified e.g. the associations examples, as now
FacetsAccumulator.create() takes care of them too, since they implement
createFacetsAggregator. Also, any future FacetRequest which will support
FacetsAggregator will be supported automatically.
> Make it easier to mix different kinds of FacetRequests
> ------------------------------------------------------
>
> Key: LUCENE-4985
> URL: https://issues.apache.org/jira/browse/LUCENE-4985
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/facet
> Reporter: Michael McCandless
> Fix For: 5.0, 4.5
>
> Attachments: LUCENE-4985.patch
>
>
> Spinoff from LUCENE-4980, where we added a strange class called
> RangeFacetsAccumulatorWrapper, which takes an incoming FSP, splits out the
> FacetRequests into range and non-range, delegates to two accumulators for
> each set, and then zips the results back together in order.
> Somehow we should generalize this class and make it work with
> SortedSetDocValuesAccumulator as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]