[
https://issues.apache.org/jira/browse/LUCENE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-5298:
-------------------------------
Attachment: LUCENE-5298.patch
Patch adds ValueSourceFacetRequest which takes a ValueSource and creates a
FacetsAggregator which aggregates by the values returned from ValueSource for
documents. The app needs to specify whether the ValueSource requires document
scores, and a matching aggregator is created accordingly.
Also added an example to demo/ of aggregating by an expression.
Note that this adds a dependency of facet/ on queries/ because ValueSource and
FunctionValues are there. If they'll move the core/ one day, we can remove the
dependency.
> Allow aggregating facets by any ValueSource
> -------------------------------------------
>
> Key: LUCENE-5298
> URL: https://issues.apache.org/jira/browse/LUCENE-5298
> Project: Lucene - Core
> Issue Type: New Feature
> Components: modules/facet
> Reporter: Shai Erera
> Attachments: LUCENE-5298.patch
>
>
> Facets can be aggregated today by counting them, aggregating by summing their
> association values, or summing the scores of the documents. Applications can
> write their own FacetsAggregator to compute the value of the facet in other
> ways. Following the new expressions module, I think it will be interesting to
> allow aggregating facets by arbitrary expressions, e.g. {{_score *
> sqrt(price)}} where 'price' is an NDV field. I'd like to explore allowing any
> ValueSource to be passed in and write a ValueSourceFacetsAggregator.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]