Hi Quan

You claim to be using LatLonType, yet the error you posted makes it clear
you are in fact using SpatialRecursivePrefixTreeFieldType (RPT).

Regardless of which spatial field you use, it's not clear to me what sort of
statistics could be useful on a spatial field.  The stats component doesn't
work with any of the spatial fields.  Well... it's possible to use
LatLonType and then do stats on just the latitude or just the longitude (you
should see the auto-generated fields for these in the online schema browser)
but that would unlikely be useful.

~ David


zhangquan913 wrote
> Hello All,
> 
> I am currently doing a spatial query in solr. I indexed "coordinates"
> (type="location" class="solr.LatLonType"), but the following query failed.
> http://localhost/solr/quan/select?q=*:*&stats=true&stats.field=coordinates&stats.facet=township&rows=0
> It showed an error:
> Field type
> location{class=org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType,analyzer=org.apache.solr.schema.FieldType$DefaultAnalyzer,args={distErrPct=0.025,
> class=solr.SpatialRecursivePrefixTreeFieldType, maxDistErr=0.000009,
> units=degrees}} is not currently supported
> 
> I don't want to create duplicate indexed field "latitude" and "longitude".
> How can I use only "coordinates" to do this kind of stats on both latitude
> and longitude?
> 
> Thanks,
> Quan





-----
 Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-access-latitude-and-longitude-with-only-LatLonType-tp4086109p4086229.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to