How to set geohash_precision to distance value?


(Red) #1

by default , geohash_precision is set to absolute length, default is 12
it can also be set to distance value, 1km, 1m ...

as i know, the distance value is fixed with difference geohash length. like this:
1 2 3 ±23 ±23 ±2500
2 5 5 ± 2.8 ±5.6 ±630
3 7 8 ± 0.70 ± 0.7 ±78
4 10 10 ± 0.087 ± 0.18 ±20
5 12 13 ± 0.022 ± 0.022 ±2.4
6 15 15 ± 0.0027 ± 0.0055 ±0.61
7 17 18 ±0.00068 ±0.00068 ±0.076
8 20 20 ±0.000086 ±0.000172 ±0.01911
9 22 23 ±0.000021 ±0.000021 ±0.00478
10 25 25 ±0.00000268 ±0.00000536 ±0.0005971
11 27 28 ±0.00000067 ±0.00000067 ±0.0001492

"Because geohashes are just strings, they can be stored in an inverted index like any other string, which makes querying them very efficient."

could es use prefix tree storing geohash strings?

each size of a geohash strings represents a particular precision as given above.

then how to set the geohash_precision to a distance value ?

1 only the distance value given above can be set to geohash_precision  ?
2 a distance value which is not in given above will cause new index type 
which is different from geohashes  inverted index?

my purpose is

1 use small index, which can be loaded to memory fast. and fully loaded one time one search
2  fast index search. 

so i think prefix tree is good enough.
is there an option to set index to a prefix tree type.
and i want to control the precision, geohash's precision is not exact enough.
i want distance precision like : 600m, 2km, 5km, 10km which fit the map level.

or is there a option to create prefix tree custom.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.