Skip to content

Commit 09006f1

Browse files
committed
Support true|false for the 'store' parameter in mappings, closes elastic#775.
1 parent 6d108e7 commit 09006f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentTypeParsers.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ public static Field.Store parseStore(String fieldName, String store) throws Mapp
129129
} else if ("yes".equals(store)) {
130130
return Field.Store.YES;
131131
} else {
132-
throw new MapperParsingException("Wrong value for store [" + store + "] for field [" + fieldName + "]");
132+
boolean value = nodeBooleanValue(store);
133+
if (value) {
134+
return Field.Store.YES;
135+
} else {
136+
return Field.Store.NO;
137+
}
133138
}
134139
}
135140

0 commit comments

Comments
 (0)