#881 - Split DocPropertyType.STRING into KEYWORD and TEXT ... for ElasticSearch 5.x support

This commit is contained in:
Rob Bygrave
2016-11-17 23:31:43 +13:00
parent 40029edca8
commit 6ca5ec986c
@@ -1386,12 +1386,12 @@ public class BeanProperty implements ElPropertyValue, Property {
public void docStoreMapping(DocMappingBuilder mapping, String prefix) {
if (mapping.includesProperty(prefix, name)) {
DocPropertyType type = scalarType.getDocType();
if (isKeywordType(type, docOptions)) {
DocPropertyOptions options = docOptions.copy();
if (isKeywordType(type, options)) {
type = DocPropertyType.KEYWORD;
}
mapping.add(new DocPropertyMapping(name, type, docOptions));
mapping.add(new DocPropertyMapping(name, type, options));
}
}