Strange.  The code in Solr that has that error string passes an an additional
exception that will have its own error message that is more detailed, and
you'll see that in the stack trace in the Solr logs; perhaps in your error
response too but I'm not sure.

If you remove the sorting, are the search results otherwise right?  I'm
looking at your query and some things look wrong.  Notably, where you refer
to "sfield", this is either supposed to be a request parameter or
local-param but you've concatenated it with the point that preceded with an
adjoining space (%20).  Use an ampersand in place of that %20 and see if it
starts working.

~ David


PeterKerk wrote
> I want to sort the results of my query on distance.
> 
> But I get this error:
> sort param could not be parsed as a query, and is not a field that exists
> in the index: geodist()
> 
> On this query:
> 
> http://localhost:8983/solr/tt/select/?indent=on&facet=true&fq=countryid:1&fq={!geofilt}&pt=51.8425,5.85278%20sfield=geolocation%20d=20&q=*:*&start=0&rows=10&fl=id,title,city&facet.mincount=1&sort=geodist()%20asc
> 
> I also tried:
> http://localhost:8983/solr/tt/select/?indent=on&facet=true&fq=countryid:1&fq={!geofilt&pt=51.8425,5.85278%20sfield=geolocation%20d=20}&q=*:*&start=0&rows=10&fl=id,title,city&facet.mincount=1&sort=geodist()%20asc
> 
> Here's what I have in my schema.xml:
> <fieldType name="location" class="solr.LatLonType"
> subFieldSuffix="_coordinate"/>
>       
> <field name="geolocation" type="location" indexed="true" stored="true"/>
> 
> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"
> stored="false"/>
> I've been checking this page: http://wiki.apache.org/solr/SpatialSearch
> But that does not mention my error.





-----
 Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
--
View this message in context: 
http://lucene.472066.n3.nabble.com/geodist-spatial-sorting-sort-param-could-not-be-parsed-as-a-query-and-is-not-a-field-that-exists-in--tp4043603p4043679.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to