David Liu created SOLR-10909:
--------------------------------
Summary: 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
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]