Package org.elasticsearch.index.mapper

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


                .field("field", "value")
                .endObject()
                .copiedBytes()).type("type").id("1").routing("routing_value"));

        assertThat(doc.rootDoc().get("_routing"), equalTo("routing_value"));
        assertThat(doc.rootDoc().get("field"), equalTo("value"));
    }
}
View Full Code Here


                .startObject()
                .field("field1", "value1")
                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(1.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));

        doc = defaultMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
View Full Code Here

                .field("field1", "value1")
                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(1.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));

        doc = defaultMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
                .startObject("field1").field("value", "value1").field("boost", 2.0f).endObject()
View Full Code Here

                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(1.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));

        doc = defaultMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
                .startObject("field1").field("value", "value1").field("boost", 2.0f).endObject()
                .field("field2", "value2")
View Full Code Here

                .startObject()
                .startObject("field1").field("value", "value1").field("boost", 2.0f).endObject()
                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(2.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));

        doc = defaultMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
View Full Code Here

                .startObject("field1").field("value", "value1").field("boost", 2.0f).endObject()
                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(2.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));

        doc = defaultMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
                .field("field1", "value1")
View Full Code Here

                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(2.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));

        doc = defaultMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
                .field("field1", "value1")
                .field("field2", "value2")
View Full Code Here

                .startObject()
                .field("field1", "value1")
                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(1.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));
    }
}
View Full Code Here

                .field("field1", "value1")
                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(1.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));
    }
}
View Full Code Here

                .field("field2", "value2")
                .copiedBytes());

        assertThat(doc.rootDoc().get("field1"), equalTo("value1"));
        assertThat((double) doc.rootDoc().getFieldable("field1").getBoost(), closeTo(1.0d, 0.000001d));
        assertThat(doc.rootDoc().get("field2"), equalTo("value2"));
    }
}
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.