Search in sources :

Example 1 with ObjectMapper

use of org.elasticsearch.index.mapper.object.ObjectMapper in project crate by crate.

the class ArrayMapper method parseInner.

private Mapper parseInner(ParseContext context) throws IOException {
    Mapper update;
    if (innerMapper instanceof FieldMapper) {
        update = ((FieldMapper) innerMapper).parse(context);
        if (copyTo() != null) {
            DocumentParser.parseCopyFields(context, (FieldMapper) innerMapper, copyTo().copyToFields());
        }
    } else {
        assert innerMapper instanceof ObjectMapper : "innerMapper must be a FieldMapper or an ObjectMapper";
        context.path().add(simpleName());
        update = DocumentParser.parseObject(context, ((ObjectMapper) innerMapper), false);
        context.path().remove();
    }
    return update;
}
Also used : ObjectMapper(org.elasticsearch.index.mapper.object.ObjectMapper) ObjectMapper(org.elasticsearch.index.mapper.object.ObjectMapper)

Aggregations

ObjectMapper (org.elasticsearch.index.mapper.object.ObjectMapper)1