Spatial search with SolrJ 3.1 ? How to

2011-05-19 Thread martin_groenhof
How do you construct a query in java for spatial search ? not the default
solr REST interface

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spatial-search-with-SolrJ-3-1-How-to-tp2961136p2961136.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Spatial search with SolrJ 3.1 ? How to

2011-05-19 Thread martin_groenhof
I don't care about the method, I just want results within let's say 10km of a
lat,lng ?

(I can do this with REST) but don't know how to with a Java API

[code]SpatialOptions spatialOptions =
new SpatialOptions(company.getLatitude() + , +
company.getLongitude(),
10, new SchemaField(geolocation, null), searchName, 20,
DistanceUnits.KILOMETERS);

LatLonType latLonType = new LatLonType();

Query query = latLonType.createSpatialQuery(new
SpatialFilterQParser(searchString.toString(), solrq, solrq, null, true),
spatialOptions);[/code]

(I am trying with this, but it does not seem to be compatible with solr only
lucene)

Any example will do, Thx

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spatial-search-with-SolrJ-3-1-How-to-tp2961136p2961452.html
Sent from the Solr - User mailing list archive at Nabble.com.