Description
The new ExpandComponent doesn't support function queries in the expand.sort parameter, such as geodist() for example. Here's the stack trace if you try:
527561 [qtp1458849419-16] ERROR org.apache.solr.servlet.SolrDispatchFilter – null:java.lang.IllegalStateException: SortField needs to be rewritten through Sort.rewrite(..) and SortField.rewrite(..) at org.apache.lucene.search.SortField.getComparator(SortField.java:433) at org.apache.lucene.search.FieldValueHitQueue$OneComparatorFieldValueHitQueue.<init>(FieldValueHitQueue.java:66) at org.apache.lucene.search.FieldValueHitQueue.create(FieldValueHitQueue.java:171) at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:1133) at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:1079) at org.apache.solr.handler.component.ExpandComponent$GroupExpandCollector.<init>(ExpandComponent.java:310) at org.apache.solr.handler.component.ExpandComponent.process(ExpandComponent.java:203) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952)