When I query Solr and ask to filter by the geodistance and supply the field and lat/lng as URL parameters it works correctly:
http://localhost:8900/solr/listing/select?fl=listingid,score,distance:geodist()&pt=33.930435,-84.373314&q=*&sfield=latlng
When I try tofollow the docsand pass the field and lat/lng directly to thegeodistfunction it throws an exception:
http://localhost:8900/solr/listing/select?fl=listingid,score,distance:geodist(latlng,33.930435,-84.373314)&q=*
2018-11-15 15:28:46.437 ERROR (qtp2050360660-45) [ x:listing] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: A ValueSource isn't directly available from this field. Instead try a query using the distance as the score. at org.apache.solr.schema.AbstractSpatialFieldType.getValueSource(AbstractSpatialFieldType.java:334) at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:384) at org.apache.solr.search.FunctionQParser.parseValueSourceList(FunctionQParser.java:227) at org.apache.solr.search.function.distance.GeoDistValueSourceParser.parse(GeoDistValueSourceParser.java:54) at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:370) at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:82) at org.apache.solr.search.QParser.getQuery(QParser.java:173)