diff options
author | Adrien Grand <jpountz@gmail.com> | 2016-11-30 13:34:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-30 13:34:46 +0100 |
commit | 6231009a8fc53ab5225483ab14a742b4555bacf3 (patch) | |
tree | ed965506bc9608514e7ab36ba32187443a8b1d0e /core/src/main/java/org/elasticsearch/search/suggest/completion/context | |
parent | 235e6acd733e385d14ef45c928368c0159d760c4 (diff) |
Remove 2.x backward compatibility of mappings. (#21670)
For the record, I also had to remove the geo-hash cell and geo-distance range
queries to make the code compile. These queries already throw an exception in
all cases with 5.x indices, so that does not hurt any more.
I also had to rename all 2.x bwc indices from `index-${version}` to
`unsupported-${version}` to make `OldIndexBackwardCompatibilityIT`
happy.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/suggest/completion/context')
-rw-r--r-- | core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java | 4 |
1 files changed, 2 insertions, 2 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 bd1449bbfe..9d5838b4b2 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 @@ -29,8 +29,8 @@ import org.elasticsearch.common.unit.DistanceUnit; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; +import org.elasticsearch.index.mapper.BaseGeoPointFieldMapper; import org.elasticsearch.index.mapper.FieldMapper; -import org.elasticsearch.index.mapper.GeoPointFieldMapper; import org.elasticsearch.index.mapper.ParseContext; import org.elasticsearch.index.mapper.ParseContext.Document; import org.elasticsearch.index.query.QueryParseContext; @@ -140,7 +140,7 @@ public class GeoContextMapping extends ContextMapping<GeoQueryContext> { public Set<CharSequence> parseContext(ParseContext parseContext, XContentParser parser) throws IOException, ElasticsearchParseException { if (fieldName != null) { FieldMapper mapper = parseContext.docMapper().mappers().getMapper(fieldName); - if (!(mapper instanceof GeoPointFieldMapper)) { + if (!(mapper instanceof BaseGeoPointFieldMapper)) { throw new ElasticsearchParseException("referenced field must be mapped to geo_point"); } } |