 geo_point field does not support GeoJson which can be a PITA if your data is in such a format. Indexing it as a geo_shape is an option but very wasteful.
server/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java
equalTo(Math.sqrt(Math.pow(polarDistance / 32768, 2) + Math.pow(equatorialDistance / 32768, 2)))
        );
        assertThat(
            GeoUtils.geoHashCellSize(7),
            equalTo(Math.sqrt(Math.pow(polarDistance / 131072, 2) + Math.pow(equatorialDistance / 262144, 2)))
        );
        assertThat(
            GeoUtils.geoHashCellSize(8),
            equalTo(Math.sqrt(Math.pow(polarDistance / 1048576, 2) + Math.pow(equatorialDistance / 1048576, 2)))
        );
        assertThat(
            GeoUtils.geoHashCellSize(9),
            equalTo(Math.sqrt(Math.pow(polarDistance / 4194304, 2) + Math.pow(equatorialDistance / 8388608, 2)))
        );
        assertThat(
            GeoUtils.geoHashCellSize(10),
            equalTo(Math.sqrt(Math.pow(polarDistance / 33554432, 2) + Math.pow(equatorialDistance / 33554432, 2)))
        );
        assertThat(
            GeoUtils.geoHashCellSize(11),
            equalTo(Math.sqrt(Math.pow(polarDistance / 134217728, 2) + Math.pow(equatorialDistance / 268435456, 2)))
        );
        assertThat(
            GeoUtils.geoHashCellSize(12),
            equalTo(Math.sqrt(Math.pow(polarDistance / 1073741824, 2) + Math.pow(equatorialDistance / 1073741824, 2)))
        );
    }
    public void testGeoHashLevelsForPrecision() {
        for (int i = 0; i < 100; i++) {
            double precision = randomDouble() * 100;