.startObject("inner").field("inner_field", "inner_value").endObject()
.endObject()
.copiedBytes());
// in this case, we analyze the type object as the actual document, and ignore the other same level fields
assertThat(doc.rootDoc().get("type_field"), equalTo("type_value"));
assertThat(doc.rootDoc().get("test1"), nullValue());
assertThat(doc.rootDoc().get("test2"), nullValue());
}
@Test public void testTypeLevelWithFieldTypeAsObject() throws Exception {