error in sum function
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=onfl=id,Num,scoresort=score%20asc,sum%28map%28Num,0,5000,42000%29,Num%29+ascq=+entities_org:%28%22Amena%22%29 http://varoitus.barcelonamedia.org:8180/fbm-ijec/select?indent=onwt=phpfl=id,Num,scorerows=50sort=score+desc,sum%28Num,map%28Num,0,2000,42000%29%29+ascq=+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.
Re: error in sum function
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=onfl=id,Num,scoresort=score%20asc,sum%28map%28Num,0,5000,42000%29,Num%29+ascq=+entities_org:%28%22Amena%22%29 http://varoitus.barcelonamedia.org:8180/fbm-ijec/select?indent=onwt=phpfl=id,Num,scorerows=50sort=score+desc,sum%28Num,map%28Num,0,2000,42000%29%29+ascq=+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.
Re: error in sum function
Ok, solved!!! Joan Koji Sekiguchi-2 wrote: 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=onfl=id,Num,scoresort=score%20asc,sum%28map%28Num,0,5000,42000%29,Num%29+ascq=+entities_org:%28%22Amena%22%29 http://varoitus.barcelonamedia.org:8180/fbm-ijec/select?indent=onwt=phpfl=id,Num,scorerows=50sort=score+desc,sum%28Num,map%28Num,0,2000,42000%29%29+ascq=+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. -- View this message in context: http://old.nabble.com/error-in-sum-function-tp27765881p27768877.html Sent from the Solr - User mailing list archive at Nabble.com.