[jira] [Closed] (SOLR-10909) Cannot sort by function

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Closed] (SOLR-10909) Cannot sort by function

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/SOLR-10909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Liu closed SOLR-10909.
    Resolution: Not A Problem

> Cannot sort by function
> ------------------------
>                 Key: SOLR-10909
>                 URL: https://issues.apache.org/jira/browse/SOLR-10909
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public)
>          Components: Server
>    Affects Versions: 6.4.1
>         Environment: ubuntu 14.4
>            Reporter: David Liu
> I have two fields in my solr schema: *solr_weight* and *brand*, I want to implement one query which can dynamically put all brand=XX data in first, and then show others and sort by solr_weight,
> so, I use *if* and *sum* function in solr sort to do it, however, looks like a bug because *if* doesn't work in sort
> {quote}sort=if(brand=="3701"; sum(solr_weight,250000); solr_weight ) desc{quote}
> {quote}ERROR: "msg":"Can't determine a Sort Order (asc or desc) in sort spec 'if(brand==\"3701\"; sum(solr_weight,250000); solr_weight ;) desc', pos=19",{quote}

This message was sent by Atlassian JIRA

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