From 3fa214653eba586d777585952e417fa7eed13293 Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 12 Oct 2010 22:30:56 +0200 Subject: [PATCH] increase precision to 16 from 12, omit norms / tf on geohash --- .../index/mapper/xcontent/geo/GeoPointFieldMapper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldMapper.java index a6c3d3ef52c..606ab150fc7 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldMapper.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/geo/GeoPointFieldMapper.java @@ -76,7 +76,7 @@ public class GeoPointFieldMapper implements XContentMapper, ArrayValueMapperPars private Integer precisionStep; - private int precision = GeoHashUtils.PRECISION; + private int precision = 16; // to get high precision private Field.Store store = Defaults.STORE; @@ -114,7 +114,8 @@ public class GeoPointFieldMapper implements XContentMapper, ArrayValueMapperPars ContentPath.Type origPathType = context.path().pathType(); context.path().pathType(pathType); - GeoHashFieldMapper geohashMapper = new GeoHashFieldMapper.Builder(name).includeInAll(false).build(context); + GeoHashFieldMapper geohashMapper = new GeoHashFieldMapper.Builder(name) + .index(Field.Index.NOT_ANALYZED).omitNorms(true).omitTermFreqAndPositions(true).includeInAll(false).store(store).build(context); NumberFieldMapper latMapper = null;