[
https://issues.apache.org/jira/browse/SOLR-6350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363524#comment-14363524
]
Hoss Man commented on SOLR-6350:
--------------------------------
(FYI, haven't looked at latest patch, just replying to comments)
bq. 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?
bq. For example, we have a test case which will test all stats combinations, I
just exclude percentiles right now, which is quite awful.
On the test side, we can just add a map of the "input" params for each stat
(for most it will be "true" for percentiles it will be the comma seperated
string)
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?
bq. And another thing is I didn't do too much performance tests around this.
There are plenty of parameters for Tdigest. I just pick a default number and
ArrayDigest.
Yeah, i definitely think we should make those options configurable via another
local param {{percentilOptions="..."}} (or maybe a suffix on the list of
percentiles?)
> 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]