lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <goks...@gmail.com>
Subject Re: Solr 4.0 => Spatial Search - How to
Date Fri, 14 Jan 2011 04:10:57 GMT
Spatial does not support separate separate fields: you don't need
lat/long, only 'coord'.

To get latitude/longitude in the coord field from the DIH, you need to
use a transformer in the DIH script.
It would populate a field 'coord' with a text string made from the lat
and lon fields:

http://wiki.apache.org/solr/DataImportHandler?#TemplateTransformer



On Wed, Jan 12, 2011 at 5:47 PM, Adam Estrada
<estrada.adam.groups@gmail.com> wrote:
> In my case, I am getting data from a database and am able to concatenate the
> lat/long as a coordinate pair to store in my coords field. To test this, I
> randomized the lat/long values and generated about 6000 documents.
>
> Adam
>
> On Wed, Jan 12, 2011 at 8:29 PM, caman <aboxfortheotherstuff@gmail.com>wrote:
>
>>
>> Adam,
>>
>> thanks. Yes that helps
>> but how does coords fields get populated? All I have is
>>
>> <field name="lat" type="tdouble" indexed="true" stored="true" />
>> <field name="lng" type="tdouble" indexed="true" stored="true" />
>>
>> <field name="coord" type="location" indexed="true" stored="true" />
>>
>> fields 'lat' and  'lng' get populated by dataimporthandler but coord, am
>> not
>> sure?
>>
>> Thanks
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Solr-4-0-Spatial-Search-How-to-tp2245592p2245709.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>



-- 
Lance Norskog
goksron@gmail.com

Mime
View raw message