lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-6354) Support stats over functions
Date Mon, 22 Sep 2014 17:46:34 GMT

    [ https://issues.apache.org/jira/browse/SOLR-6354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143512#comment-14143512
] 

ASF subversion and git services commented on SOLR-6354:
-------------------------------------------------------

Commit 1626856 from hossman@apache.org in branch 'dev/trunk'
[ https://svn.apache.org/r1626856 ]

SOLR-6354: stats.field can now be used to generate stats over the numeric results of arbitrary
functions

> Support stats over functions
> ----------------------------
>
>                 Key: SOLR-6354
>                 URL: https://issues.apache.org/jira/browse/SOLR-6354
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Hoss Man
>         Attachments: SOLR-6354.patch, SOLR-6354.patch, SOLR-6354.patch, TstStatsComponent.java
>
>
> The majority of the logic in StatsValuesFactory for dealing with stats over fields just
uses the ValueSource API.  There's very little reason we can't generalize this to support
computing aggregate stats over any arbitrary function (or the scores from an arbitrary query).
> Example...
> {noformat}
> stats.field={!func key=mean_rating mean=true}prod(user_rating,pow(editor_rating,2))
> {noformat}
> ...would mean that we can compute a conceptual "rating" for each doc by multiplying the
user_rating field by the square of the editor_rating field, and then we'd compute the mean
of that "rating" across all docs in the set and return it as "mean_rating"



--
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


Mime
View raw message