From 4128d635f4486aaecfbfd21561feb41d5fb22be7 Mon Sep 17 00:00:00 2001 From: Dimitris Athanasiou Date: Fri, 13 Jan 2017 12:39:59 +0000 Subject: [PATCH] Remove explicit _all disabling from mappings (elastic/elasticsearch#719) The _all field is now deprecated and disabled by default in elasticsearch 6.0.0. We no longer need to disable it explicitly. Original commit: elastic/x-pack-elasticsearch@c71465083ae2ebf98cd167e7e6684d52372d5df7 --- .../persistence/ElasticsearchMappings.java | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java index 2c5084414b6..5e794560ea5 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java @@ -56,7 +56,6 @@ public class ElasticsearchMappings { /** * String constants used in mappings */ - static final String ALL = "_all"; static final String ENABLED = "enabled"; static final String ANALYZER = "analyzer"; static final String WHITESPACE = "whitespace"; @@ -125,9 +124,6 @@ public class ElasticsearchMappings { XContentBuilder builder = jsonBuilder() .startObject() .startObject(Result.TYPE.getPreferredName()) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(ALL_FIELD_VALUES) .field(TYPE, TEXT) @@ -400,9 +396,6 @@ public class ElasticsearchMappings { .startObject() .startObject(DataCounts.TYPE.getPreferredName()) .field(ENABLED, false) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(Job.ID.getPreferredName()) .field(TYPE, KEYWORD) @@ -455,9 +448,6 @@ public class ElasticsearchMappings { .startObject() .startObject(CategorizerState.TYPE) .field(ENABLED, false) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .endObject() .endObject(); } @@ -474,9 +464,6 @@ public class ElasticsearchMappings { .startObject() .startObject(Quantiles.TYPE.getPreferredName()) .field(ENABLED, false) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .endObject() .endObject(); } @@ -492,9 +479,6 @@ public class ElasticsearchMappings { return jsonBuilder() .startObject() .startObject(CategoryDefinition.TYPE.getPreferredName()) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(CategoryDefinition.CATEGORY_ID.getPreferredName()) .field(TYPE, LONG) @@ -531,9 +515,6 @@ public class ElasticsearchMappings { .startObject() .startObject(ModelState.TYPE.getPreferredName()) .field(ENABLED, false) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .endObject() .endObject(); } @@ -546,9 +527,6 @@ public class ElasticsearchMappings { XContentBuilder builder = jsonBuilder() .startObject() .startObject(ModelSnapshot.TYPE.getPreferredName()) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(Job.ID.getPreferredName()) .field(TYPE, KEYWORD) @@ -647,9 +625,6 @@ public class ElasticsearchMappings { return jsonBuilder() .startObject() .startObject(Usage.TYPE) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(Usage.TIMESTAMP) .field(TYPE, DATE) @@ -672,9 +647,6 @@ public class ElasticsearchMappings { return jsonBuilder() .startObject() .startObject(AuditMessage.TYPE.getPreferredName()) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(AuditMessage.TIMESTAMP.getPreferredName()) .field(TYPE, DATE) @@ -688,9 +660,6 @@ public class ElasticsearchMappings { return jsonBuilder() .startObject() .startObject(AuditActivity.TYPE.getPreferredName()) - .startObject(ALL) - .field(ENABLED, false) - .endObject() .startObject(PROPERTIES) .startObject(AuditActivity.TIMESTAMP.getPreferredName()) .field(TYPE, DATE)