Re: Solr 4.0 => Spatial Search - How to

2011-01-14 Thread Stefan Matheis
absolutely no idea why it is a blob .. but the following one works as expected: CAST( CONCAT( lat, ',', lng ) AS CHAR ) HTH Stefan On Fri, Jan 14, 2011 at 9:31 AM, caman wrote: > > > CONCAT(CAST(lat as CHAR),',',CAST(lng as CHAR)) > -- > View this message in context: > http://lucene.472066.n3.n

Re: Solr 4.0 => Spatial Search - How to

2011-01-14 Thread caman
CONCAT(CAST(lat as CHAR),',',CAST(lng as CHAR)) -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-Spatial-Search-How-to-tp2245592p2254151.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 4.0 => Spatial Search - How to

2011-01-14 Thread Stefan Matheis
caman, how did you try to concat them? perhaps some typecasting would do the trick? Stefan On Fri, Jan 14, 2011 at 7:20 AM, caman wrote: > > Thanks > Here was the issues. Concatenating 2 floats(lat,lng) at mysql end converted > it to a BLOB. Indexing would fail in storing BLOB in 'location' typ

Re: Solr 4.0 => Spatial Search - How to

2011-01-13 Thread caman
Thanks Here was the issues. Concatenating 2 floats(lat,lng) at mysql end converted it to a BLOB. Indexing would fail in storing BLOB in 'location' type field. After BLOB issue was resolved, all worked ok. Thank you all for your help -- View this message in context: http://lucene.472066.n3.na

Re: Solr 4.0 => Spatial Search - How to

2011-01-13 Thread Grijesh.singh
I have used that type of location searching. But I have not used spatial search. I wrote my logic at application end. I have cached the location ids and their lat/lang. When queries are comming for any location say "New Delhi" then my location searche logic at application end calculate the distanc

Re: Solr 4.0 => Spatial Search - How to

2011-01-13 Thread Lance Norskog
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.

Re: Solr 4.0 => Spatial Search - How to

2011-01-12 Thread Adam Estrada
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 wrote: > > Adam, > > thanks. Yes

Re: Solr 4.0 => Spatial Search - How to

2011-01-12 Thread Adam Estrada
Actually, I by looking at the results from the "geofilt" filter it would appear that it's not giving me the results I'm looking for. Or maybe it is...I need to convert my results to KML to see if it is actually performing a proper radius query. http://localhost:8983/solr/select?q=*:*&fq={!geofilt%

Re: Solr 4.0 => Spatial Search - How to

2011-01-12 Thread caman
Adam, thanks. Yes that helps but how does coords fields get populated? All I have is 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-tp2245592p224

Re: Solr 4.0 => Spatial Search - How to

2011-01-12 Thread Adam Estrada
I believe this is what you are looking for. I renamed the field called "store" to "coords" in the schema.xml file. The tricky part is building out the query. I am using SolrNet to do this though and have not yet cracked the problem. http://localhost:8983/solr/select?q=*:*+AND+eventdate:[2006-01-21

Solr 4.0 => Spatial Search - How to

2011-01-12 Thread caman
Ok, this could be very easy to do but was not able to do this. Need to enable location search i.e. if someone searches for location 'New York' => show results for New York and results within 50 miles of New York. We do have latitude/longitude stored in database for each record but not sure how to