Please help me,
I cannot make sharding on geo_point work.
I would like to store one value and a geo location (latitude and longitude) in a document.
I would like to populate shards (route) based on location.
Then I would like to query the the average value of the 50 closest location.
My mappings:
{
"mappings" : {
"DocType" : {
"_source" : { "enabled" : true },
"_all" : { "enabled" : true},
"_routing" : {
"required" : true,
"path" : "location"
},
"properties" : {
"location" : { "type":"geo_point", "lat_lon":true, "geohash":true, "geohash_prefix":true, "geohash_precision": "50km" },
"value" : { "type":"float" , "index":"not_analyzed" },
}
}
}
}
Settings for 10 shards and 0 replicas:
{
"number_of_shards" : 10,
"number_of_replicas" : 0
}
But all my documents with various lat and lon coordiantes are inserted into one shard.
Please help me what I have missed in the documentation.
Can I shard based on a geo-point field somehow.
The default sharding is not good for me, because the documents are scattered over the 10 shards and each node is overloaded.
Thanks,
Béla