1) which version of solr are you using?
2) what is the field & fieldtype for "geolocation"
2) can you try changing your query to "q={!func}geodist()" to verify that the 
function works at all?



: Date: Tue, 5 Mar 2013 19:30:33 +0100
: From: Luis Cappa Banda <luisca...@gmail.com>
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: Solr 4.1: problems with Spatial Search.
: 
: Without the sort it works perfectly, and there are no more error messages,
: just the one I copy&pasted, :-(
: El 05/03/2013 19:05, "David Smiley (@MITRE.org)" <dsmi...@mitre.org>
: escribió:
: 
: > Hmm; weird.  It looks right.  Does it work without the sort? -- i.e. does
: > the
: > filter work?  Are there more interesting looking error messages output by
: > Solr?
: >
: >
: > Rakudten wrote
: > > Hello!
: > >
: > > I´m trying to sort by geodist() distance, but it seems that I can´t:
: > >
: > > *The query:*
: > >
: > >
: > 
http://192.168.1.129:8080/geo/zones/select?q=*:*&fq={!geofilt}&sfield=geolocation&pt=38.96442,-3.89047&d=10&wt=json&start=0&rows=10&sort=geodist()%20asc
: > >
: > > *The response:*
: > > *
: > > *
: > >
: > > {
: > > responseHeader: {
: > > status: 400,
: > > QTime: 2,
: > > params: {
: > > d: "10",
: > > sort: "geodist() asc",
: > > start: "0",
: > > q: "*:*",
: > > sfield: "geolocation",
: > > pt: "38.96442,-3.89047",
: > > wt: "json",
: > > fq: "{!geofilt}",
: > > rows: "10"
: > > }
: > > },
: > > error: {
: > > msg: "sort param could not be parsed as a query, and is not a field that
: > > exists in the index: geodist()",
: > > code: 400
: > > }
: > > }
: > >
: > > I´ve read several times the documentation and it seems that this is the
: > > correct way to search filtering by coordinates and sorting by distance,
: > > but
: > > I doesn´t work. Any suggestions?
: > >
: > > Also I´ve tried to return the distance as a field via fl params, but I
: > > couldn´t. It may help me a lot if anyone could tell me how to do it.
: > >
: > > Thank you very much in advance!
: > >
: > >
: > > Best regards,
: > >
: > >
: > > - Luis Cappa
: >
: >
: >
: >
: >
: > -----
: >  Author:
: > http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
: > --
: > View this message in context:
: > 
http://lucene.472066.n3.nabble.com/Solr-4-1-problems-with-Spatial-Search-tp4044868p4044958.html
: > Sent from the Solr - User mailing list archive at Nabble.com.
: >
: 

-Hoss

Reply via email to