Re: Spatial search with SolrJ 3.1 ? How to
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.
Re: Spatial search with SolrJ 3.1 ? How to
On Thu, May 19, 2011 at 8:52 AM, martin_groenhof wrote: > How do you construct a query in java for spatial search ? not the default > solr REST interface It depends on what you are trying to do - a spatial request (as currently implemented in Solr) is typically more than just a query... it can be filtering by a bounding box, filtering by a distance radius, or using a distance (geodist) function query in another way such as sorting by it or using it as a factor in relevance. -Yonik http://www.lucenerevolution.org -- Lucene/Solr User Conference, May 25-26, San Francisco
Spatial search with SolrJ 3.1 ? How to
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.