diff options
author | Nicholas Knize <nknize@gmail.com> | 2015-11-10 16:46:24 -0600 |
---|---|---|
committer | Nicholas Knize <nknize@gmail.com> | 2015-11-12 23:01:51 -0600 |
commit | dc778157441fa3528609321d0820030dbaff2033 (patch) | |
tree | 873c81a35963bb572e765b55b967e8693f02ecc9 /core/src/main/java/org/elasticsearch/search/suggest/completion | |
parent | 720ebe347d1410bce178e4f244237b9870403b84 (diff) |
Enable GeoPointV2 with backward compatibility testing
This commit removes all noreleases and cuts over to Lucene 5.4 GeoPointField type. Included are randomized testing updates to unit and integration test suites for ensuring full backward compatability with existing geo_point indexes.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/suggest/completion')
-rw-r--r-- | core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java b/core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java index d4ff2f106b..57283c1bd0 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java @@ -19,6 +19,7 @@ package org.elasticsearch.search.suggest.completion.context; +import org.apache.lucene.document.StringField; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.IndexableField; import org.apache.lucene.util.GeoHashUtils; @@ -193,7 +194,11 @@ public class GeoContextMapping extends ContextMapping { } } else { for (IndexableField field : fields) { - spare.resetFromString(field.stringValue()); + if (field instanceof StringField) { + spare.resetFromString(field.stringValue()); + } else { + spare.resetFromIndexHash(Long.parseLong(field.stringValue())); + } geohashes.add(spare.geohash()); } } |