Package org.elasticsearch.index.mapper

Examples of org.elasticsearch.index.mapper.ParsedDocument.parent()


                .field("x_field", "x_value")
                .endObject()
                .bytes()).type("type").id("1"));

        // no _parent mapping, used as a simple field
        assertThat(doc.parent(), nullValue());
        assertThat(doc.rootDoc().get("_parent"), nullValue());
    }

    @Test
    public void parentSetInDocNotExternally() throws Exception {
View Full Code Here


                .field("_parent", "1122")
                .field("x_field", "x_value")
                .endObject()
                .bytes()).type("type").id("1"));

        assertThat(doc.parent(), equalTo("1122"));
        assertThat(doc.rootDoc().get("_parent"), equalTo(Uid.createUid("p_type", "1122")));
    }

    @Test
    public void parentNotSetInDocSetExternally() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.