Re: Solr Design question on spatial search

2012-03-05 Thread Lance Norskog
The Lucene geo searching code is very fast. Geosearch queries calculate the distance from the city to all 20k stores and sort on this. If this is not fast enough, you can pre-calculate the city/store lists by doing all of this searching in advance. You can store these in a DB and do incremental up

Re: Solr Design question on spatial search

2012-03-02 Thread Venu Gmail Dev
Sorry for not being clear enough. I don't know the point of origin. All I know is that there are 20K retail stores. Only the cities within 10 miles radius of these stores should be searchable. Any city which is outside these small 10miles circles around these 20K stores should be ignored. So w

Re: Solr Design question on spatial search

2012-03-02 Thread Erick Erickson
But again, that doesn't answer the problem I posed. Where is your point of origin? There's nothing in what you've written that indicates how you would know that 10 miles is relative to San Francisco. All you've said is that you're searching on "San". Which would presumably return San Francisco, San

Re: Solr Design question on spatial search

2012-03-02 Thread Venu Dev
So let's say x=10 miles. Now if I search for San then San Francisco, San Mateo should be returned because there is a retail store in San Francisco. But San Jose should not be returned because it is more than 10 miles away from San Francisco. Had there been a retail store in San Jose then it shou

Re: Solr Design question on spatial search

2012-03-02 Thread Erick Erickson
I don't see how this works, since your search for San could also return San Marino, Italy. Would you then return all retail stores in X miles of that city? What about San Salvador de Jujuy, Argentina? And even in your example, San would match San Mateo. But should the search then return any stores

Re: Solr Design question on spatial search

2012-03-01 Thread Venu Gmail Dev
I don't think Spatial search will fully fit into this. I have 2 approaches in mind but I am not satisfied with either one of them. a) Have 2 separate indexes. First one to store the information about all the cities and second one to store the retail stores information. Whenever user searches fo

Re: Solr Design question on spatial search

2012-02-29 Thread Dirceu Vieira
I believe that what you need is spatial search... Have a look a the documention: http://wiki.apache.org/solr/SpatialSearch On Wed, Feb 29, 2012 at 10:54 PM, Venu Shankar wrote: > Hello, > > I have a design question for Solr. > > I work for an enterprise which has a lot of retail stores (approx.

Solr Design question on spatial search

2012-02-29 Thread Venu Shankar
Hello, I have a design question for Solr. I work for an enterprise which has a lot of retail stores (approx. 20K). These retail stores are spread across the world. My search requirement is to find all the cities which are within x miles of a retail store. So lets say if we have a retail Store i