lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Heigl (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2642) Sorting by function fails when using result grouping
Date Thu, 21 Jul 2011 12:17:58 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068949#comment-13068949
] 

Thomas Heigl commented on SOLR-2642:
------------------------------------

Thanks Martijn! Works perfectly.

> Sorting by function fails when using result grouping
> ----------------------------------------------------
>
>                 Key: SOLR-2642
>                 URL: https://issues.apache.org/jira/browse/SOLR-2642
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.3
>            Reporter: Thomas Heigl
>            Assignee: Martijn van Groningen
>             Fix For: 3.4, 4.0
>
>
> When using result grouping, sorting by distance with geodist() fails because of missing
weights for sorts.
> A an example of a failing query on an index with standard schema.xml looks like this:
> {code}
> 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
> {code}
> The exception thrown is:
> {code}
> 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
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message