Support true|false for the 'store' parameter in mappings, closes #775.

This commit is contained in:
kimchy 2011-03-13 00:41:58 +02:00
parent 6d108e77f1
commit 09006f17c3
1 changed files with 6 additions and 1 deletions

View File

@ -129,7 +129,12 @@ public class XContentTypeParsers {
} else if ("yes".equals(store)) {
return Field.Store.YES;
} else {
throw new MapperParsingException("Wrong value for store [" + store + "] for field [" + fieldName + "]");
boolean value = nodeBooleanValue(store);
if (value) {
return Field.Store.YES;
} else {
return Field.Store.NO;
}
}
}