[
https://issues.apache.org/jira/browse/SOLR-14007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17055476#comment-17055476
]
Yonik Seeley commented on SOLR-14007:
-------------------------------------
.bq Even if JSON percentile doesn't use NamedList, response format shouldn't
change based on number of percentiles
I think that is the primary question.
For something that is inherently a list, then yes, the response format should
always be a list regardless of the number of matches (like our docs[] for top
matching documents)
For percentile(), if the norm was a single argument, then representing the
response as a single value would be natural and multiple values would be an
extension (but an exception.)
My guess is that the majority use-cases of percentile() are asking for the
median (a single value.)
If we do go through with always representing percentile() responses as a list,
perhaps we should add a simple median() function to simplify the response
format for the majority of use cases?
Regardless, what the Stats component currently does should really shouldn't
have much bearing on what solution we chose here. Consistency should not be a
goal since the Stats component should be deprecated. I also do question if
this change actually makes anyones lives easier. The vast majority of clients
would know what they are asking for and hence the form of answer they will get
back?
> Difference response format for percentile aggregation
> -----------------------------------------------------
>
> Key: SOLR-14007
> URL: https://issues.apache.org/jira/browse/SOLR-14007
> Project: Solr
> Issue Type: Sub-task
> Components: Facet Module
> Reporter: Munendra S N
> Assignee: Munendra S N
> Priority: Major
> Attachments: SOLR-14007.patch
>
>
> For percentile,
> In Stats component, the response format for percentile is {{NamedList}} but
> in JSON facet, the format is either array or single value depending on number
> of percentiles specified.
> Even if JSON percentile doesn't use NamedList, response format shouldn't
> change based on number of percentiles
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]