Can you try it latest trunk? I have just fixed it in a couple of days
Koji Sekiguchi from mobile
On 2010/03/03, at 18:18, JCodina <joan.cod...@barcelonamedia.org> wrote:
the sum function or the map one are not parsed correctly,
doing this sort, works as a charm...
sort=score+desc,sum(Num,map(Num,0,2000,42000))+asc
but
sort=score+desc,sum(map(Num,0,2000,42000),Num)+asc
gives the following exception
SEVERE: org.apache.solr.common.SolrException: Must declare sort
field or
function
at
org.apache.solr.search.QueryParsing.processSort(QueryParsing.java:376)
at
org.apache.solr.search.QueryParsing.parseSort(QueryParsing.java:281)
at org.apache.solr.search.QParser.getSort(QParser.java:217)
at
org.apache.solr.handler.component.QueryComponent.prepare
(QueryComponent.java:86)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody
(SearchHandler.java:174)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest
(RequestHandlerBase.java:131)
you can test it in here using these two url's
http://varoitus.barcelonamedia.org:8180/fbm-ijec/select?indent=on&fl=id,Num,score&sort=score%20asc,sum%28map%28Num,0,5000,42000%29,Num%29+asc&q=+entities_org:%28%22Amena%22%29
http://varoitus.barcelonamedia.org:8180/fbm-ijec/select?indent=on&wt=php&fl=id,Num,score&rows=50&sort=score+desc,sum%28Num,map%28Num,0,2000,42000%29%29+asc&q=+entities_org:Amena
--
View this message in context:
http://old.nabble.com/error-in-sum-function-tp27765881p27765881.html
Sent from the Solr - User mailing list archive at Nabble.com.