Skip to content

Commit 9c82e74

Browse files
author
EmmanuelDuru
committed
Upgrade ES 5
1 parent 3e0e05d commit 9c82e74

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

elasticsearch-mapping/src/main/java/org/elasticsearch/mapping/parser/MapKeyValueAnnotationParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void parseAnnotation(MapKeyValue annotation, Map<String, Object> fieldDef
4646
if (annotation.indexType() == IndexType.analyzed) {
4747
keyFieldDefinition.put("type", "text");
4848
keyFieldDefinition.put("index", "true");
49+
keyFieldDefinition.put("fielddata", "true");
4950
} else if (annotation.indexType() == IndexType.not_analyzed) {
5051
keyFieldDefinition.put("type", "keyword");
5152
keyFieldDefinition.put("index", "true");

elasticsearch-mapping/src/main/java/org/elasticsearch/mapping/parser/StringFieldAnnotationParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public void parseAnnotation(StringField annotation, Map<String, Object> fieldDef
2525
if (annotation.indexType() == IndexType.analyzed) {
2626
fieldDefinition.put("type", "text");
2727
fieldDefinition.put("index", "true");
28+
fieldDefinition.put("fielddata", "true");
2829
} else if (annotation.indexType() == IndexType.not_analyzed) {
2930
fieldDefinition.put("type", "keyword");
3031
fieldDefinition.put("index", "true");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"city":{"_source":{"enabled":true},"_all":{"enabled":true},"properties":{"city":{"include_in_all":true,"index":"true","boost":1.0,"store":false,"type":"keyword","fields":{"lower_case":{"include_in_all":false,"analyzer":"lowerCaseAnalyser","index":"true","boost":1.0,"store":false,"type":"text"}}}}}}
1+
{"city":{"_source":{"enabled":true},"_all":{"enabled":true},"properties":{"city":{"include_in_all":true,"index":"true","boost":1.0,"store":false,"type":"keyword","fields":{"lower_case":{"include_in_all":false,"fielddata":"true","analyzer":"lowerCaseAnalyser","index":"true","boost":1.0,"store":false,"type":"text"}}}}}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"person":{"_source":{"enabled":true},"_all":{"analyzer":"simple","store":false,"enabled":true},"properties":{"firstname":{"include_in_all":false,"index":"false","boost":1.0,"store":false,"type":"keyword"},"address":{"type":"nested","properties":{"city":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"type":"keyword"}}},"alienScore":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"ignore_malformed":false,"type":"long"},"addressMap":{"type":"object","enabled":"true","properties":{"value":{"properties":{"city":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"type":"keyword"}}},"key":{"include_in_all":true,"index":"false","boost":1.0,"store":false,"type":"keyword"}}},"alternateAddress":{"type":"object","enabled":true,"properties":{"city":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"type":"keyword"}}},"lastname":{"include_in_all":true,"index":"true","boost":1.0,"store":false,"type":"text"}}}}
1+
{"person":{"_source":{"enabled":true},"_all":{"analyzer":"simple","store":false,"enabled":true},"properties":{"firstname":{"include_in_all":false,"index":"false","boost":1.0,"store":false,"type":"keyword"},"address":{"type":"nested","properties":{"city":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"type":"keyword"}}},"alienScore":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"ignore_malformed":false,"type":"long"},"addressMap":{"type":"object","enabled":"true","properties":{"value":{"properties":{"city":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"type":"keyword"}}},"key":{"include_in_all":true,"index":"false","boost":1.0,"store":false,"type":"keyword"}}},"alternateAddress":{"type":"object","enabled":true,"properties":{"city":{"include_in_all":false,"index":"true","boost":1.0,"store":false,"type":"keyword"}}},"lastname":{"include_in_all":true,"fielddata":"true","index":"true","boost":1.0,"store":false,"type":"text"}}}}

0 commit comments

Comments
 (0)