You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2015/03/25 15:29:52 UTC
[jira] [Updated] (SOLR-7306) Add percentiles to Facet Module
[ https://issues.apache.org/jira/browse/SOLR-7306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-7306:
-------------------------------
Attachment: SOLR-7306.patch
Here's a patch, it was simpler than I thought to add support.
As a testament to the pluggability / flexibility of the new faceting module, this is something that an end user could have done with a plugin - no need to modify Solr source files.
> Add percentiles to Facet Module
> -------------------------------
>
> Key: SOLR-7306
> URL: https://issues.apache.org/jira/browse/SOLR-7306
> Project: Solr
> Issue Type: New Feature
> Reporter: Yonik Seeley
> Attachments: SOLR-7306.patch
>
>
> Use Ted Dunnings t-digest to add distributed percentile support to the new Facet Module (aka "JSON Facets").
> {code}
> // single percentile over complete doc set
> json.facet={ median : 'percentile(my_field,50)' }
> // calculate multiple percentiles of a function
> json.facet={multi:'percentile( mul(f1,f2), 1,10,50,90,99)' }
> // calculate the median of each facet bucket and sort by that value
> json.facet={categories:{terms:{
> field:cat ,
> sort:'median desc' ,
> facet : {
> median : 'percentile(myfield,50)' ,
> otherstat : 'sum(something_else)'
> }
> }}}
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org