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

Yonik Seeley commented on SOLR-9675:
------------------------------------

Hmmm, in the general case, Solr is not going to know that there is only one 
unique sl1 value per gc2 bucket.
What we need is for min/max aggregates to support string values (right now they 
just support numbers), one could use min(sl1) or max(sl1) as the sort criteria.

> Sorting on field in JSON Facet API which is not part of JSON Facet.
> -------------------------------------------------------------------
>
>                 Key: SOLR-9675
>                 URL: https://issues.apache.org/jira/browse/SOLR-9675
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: AMRIT SARKAR
>            Priority: Minor
>
> Here's a sample example:
> There is a requirement to facet on a particular field but sort on another 
> field which is not part of json facet.
> For example, consider schema with fields : sl1, sl2, product_bkgs, gc_2
> Solr query & facet : q=sl1 : ("abc") AND sl2 : ("xyz")&sort=sl1 desc&rows=0
> & json.facet={
> "group_column_level" :
> {
> "type" : "terms",
> "field" : "gc_2",
> "offset" : 0,
> "limit" :25,
> "sort" : { "product_bkgs" : "desc"},
> "facet" :
> {
> "product_bkgs" :"sum(product_bkgs)"
> }
> }
> }
> Sort on product_bkgs is possible but not on sl1 in the facet.
> Let me know if anything can be done to achieve the same.
> Thanks in advance.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to