[
https://issues.apache.org/jira/browse/SOLR-6350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14364541#comment-14364541
]
Xu Zhang commented on SOLR-6350:
--------------------------------
{quote}
This also shows the edge case: when user asking percentiles for empty document
set, we will give NaN.
I think we should probably return 'null' for each percentile in that case?
{quote}
Sure, will add some test cases for this .
{quote}
I'm still not really comfortable with how those inpts are parsed though ...
ultimately i'd like to refactor all of that stuff and push it down into the
StatsValuesFactories (so each factor has an API returning what Stats it
supports, failures are produced if you request an unsupported stat) – but for
now, maybe we can just introduce a boolean parseParams(StatsField) into each
Stat - most Stat instances could use a default impl that would look something
like...
{code}
/** return value of true means user is requesting this stat */
boolean parseParams(StatsField sf) {
return sf.getLocalParams().getBool(this.getName());
}
{code}
...but percentiles could be more interesting? ...
{code}
/** return value of true means user is requesting this stat */
boolean parseParams(StatsField sf) {
String input = sf.getLocalParams().get(this.getName());
if (null ! = input) {
sf.setTDigetsOptions(input);
return true;
}
return false;
}
{code}
...what do you think?
{quote}
+1 :)
{quote}
Yeah, i definitely think we should make those options configurable via another
local param percentilOptions="..." (or maybe a suffix on the list of
percentiles?)
{quote}
I think "percentilOptions" would be really nice. I will improve the patch based
on Hoss's comments, maybe tomorrow.
> Percentiles in StatsComponent
> -----------------------------
>
> Key: SOLR-6350
> URL: https://issues.apache.org/jira/browse/SOLR-6350
> Project: Solr
> Issue Type: Sub-task
> Reporter: Hoss Man
> Attachments: SOLR-6350-Xu.patch, SOLR-6350-Xu.patch,
> SOLR-6350-xu.patch, SOLR-6350-xu.patch, SOLR-6350.patch, SOLR-6350.patch
>
>
> Add an option to compute user specified percentiles when computing stats
> Example...
> {noformat}
> stats.field={!percentiles='1,2,98,99,99.999'}price
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]