Yes, sounds right.

Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/


----- Original Message -----
> From: Jason Toy <jason...@gmail.com>
> To: solr-user@lucene.apache.org; Otis Gospodnetic <otis_gospodne...@yahoo.com>
> Cc: 
> Sent: Thursday, October 6, 2011 12:01 PM
> Subject: Re: what is the recommended way to store locations?
> 
> Hi Otis,
> Thanks for the response. So just to make sure I understand clearly, so I
> would store a location field of either text or ngram fields
> of the format "San Francisco, California, United States"  and use full 
> text
> search against that so someone could search for San Francisco or California
> and get that hit?
> I've also added some code in the application level so that if someone
> searches for CA, it gets expanded to California during search time, would it
> be better to store this in the doc directly or keep it in application code?
> 
> Jason
> 
> 
> On Thu, Oct 6, 2011 at 11:34 AM, Otis Gospodnetic <
> otis_gospodne...@yahoo.com> wrote:
> 
>>  Jason,
>> 
>>  That sounds pretty simple and works well if you plan on allowing
>>  fielded/structured search.
>>  If not, you could alternatively stick all geo values in a single text field
>>  and avoid dealing with multiple fields.
>> 
>>  You may also want to use ngram fields instead of text if you want to still
>>  match that San Fransisco oops typo.
>> 
>>  Otis
>>  ----
>>  Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
>>  Lucene ecosystem search :: http://search-lucene.com/
>> 
>> 
>>  ----- Original Message -----
>>  > From: Jason Toy <jason...@gmail.com>
>>  > To: solr-user@lucene.apache.org
>>  > Cc:
>>  > Sent: Thursday, October 6, 2011 11:27 AM
>>  > Subject: what is the recommended way to store locations?
>>  >
>>  > In our current system ,we have 3 fields for location,  city, state, 
> and
>>  > country.    People in our system search for one of those 3 strings.
>>  > So a user can search for "San Francisco" or 
> "California".
>>  > In solr I store
>>  > those 3 fields as strings and when a search happens I search with an 
> OR
>>  > statement across those 3 fields.
>>  >
>>  > Is there a more efficient way to store this data storage wise and/or
>>  speed
>>  > wise?  We don't currently plan to use any spacial features like 
> "3
>>  > miles
>>  > near SF".
>>  >
>> 
> 
> 
> 
> -- 
> - sent from my mobile
> 6176064373
>

Reply via email to