Hello, I just tried up(down?)grading our current Solr 4.0 trunk setup to Solr 3.3.0 as result grouping was the only reason for us to stay with the trunk. Everything worked like a charm except for one of our queries, where we group results by the owning user and sort by distance.
A simplified example for my query (that still fails) looks like this: q=*:*&group=true&group.field=user.uniqueId_s&group.main=true&group.format=grouped&sfield=user.location_p&pt=48.20927,16.3728&sort=geodist() > asc The exception thrown is: Caused by: org.apache.solr.common.SolrException: Unweighted use of sort > geodist(latlon(user.location_p),48.20927,16.3728) > at > org.apache.solr.search.function.ValueSource$1.newComparator(ValueSource.java:106) > at org.apache.lucene.search.SortField.getComparator(SortField.java:413) > at > org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector.<init>(AbstractFirstPassGroupingCollector.java:81) > at > org.apache.lucene.search.grouping.TermFirstPassGroupingCollector.<init>(TermFirstPassGroupingCollector.java:56) > at > org.apache.solr.search.Grouping$CommandField.createFirstPassCollector(Grouping.java:587) > at org.apache.solr.search.Grouping.execute(Grouping.java:256) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:237) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368) > at > org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:140) > ... 39 more Any ideas how to fix this or work around this error for now? I'd really like to move from the trunk to the stable 3.3.0 release and this is the only problem currently keeping me from doing so. Cheers, Thomas