#584 - ElasticSearch: Internal changes - Enum and UUID tests

This commit is contained in:
Robin Bygrave
2016-03-04 00:04:58 +13:00
parent 04c9db1e42
commit 5c0fb7c8cd
@@ -1319,7 +1319,7 @@ public class BeanProperty implements ElPropertyValue, Property {
DocPropertyType type = scalarType.getDocType();
DocPropertyOptions options = docOptions.copy();
if (DocPropertyType.STRING == type && isDocCode()) {
if (id || DocPropertyType.ENUM == type) {
options.setCode(true);
}
@@ -1327,10 +1327,4 @@ public class BeanProperty implements ElPropertyValue, Property {
}
}
/**
* Return true if this should be treated as a 'code' (effectively not analysed).
*/
private boolean isDocCode() {
return id || scalarType instanceof ScalarTypeEnum;
}
}