Hi Jörg, I've reached the desired result, but it's working strangely. Here is what I mean.
If I run this (delete the river and the index itself and then recreate them): curl -XDELETE localhost:9200/_river/venues_river curl -XDELETE 'http://localhost:9200/venues' curl -XPUT 'localhost:9200/_river/venues_river/_meta' -d '{ "strategy" : "simple", "type" : "jdbc", "jdbc" : { ... }, "index" : { "index" : "venues", "type" : "venue" }, "mappings" : { "venue" : { "properties" : { .... "location" : {"type" : "geo_point"} } } } }' even though the location type is set as geo_point, when I check the url: http://localhost:9200/venues/_mapping I can see that there is no type assigned to the location. It has { venues: { venue: { properties: { ... location: { properties: { lat: {type: "double"}, lng: {type: "double"} } }, } } } } Although if I create a new mapping like this: curl -XPUT 'http://localhost:9200/venues/geo/_mapping' -d ' { "venue" : { "properties" : { "location" : {"type" : "geo_point"} } } }' I can see that the second one the location has type "geo_point". If I replace /geo/ with /venue/ it return error MergeMappingException[Merge failed with failures {[Can't merge a non object mapping [location] with an object mapping [location]]}] Could that be a bug or because the location has sub nodes it doesn't set the type? Thanks for the quick response! On Thursday, December 19, 2013 9:45:08 PM UTC, Nikolay Chankov wrote: > > Thanks for the hint, Jörg > > I will try it! > > On Thursday, December 19, 2013 7:54:02 PM UTC, Jörg Prante wrote: >> >> My suggestion is to use two SQL columns "location.lat" and "location.lon" >> instead of flat "lat" and "lng". With "type": "geo_point" mapping, a geo >> search should be straightforward. >> >> Jörg >> >> -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/83168f6c-0a66-4622-9402-228deb0cd275%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
