Check inner field with metadata field name is ok

This commit is contained in:
Ryan Ernst 2016-08-02 17:03:21 -07:00
parent 4e48154130
commit 7bfe1bd628
1 changed files with 3 additions and 0 deletions

View File

@ -873,5 +873,8 @@ public class DocumentParserTests extends ESSingleNodeTestCase {
mapper.parse("test", "type", "1", bytes)
);
assertTrue(e.getMessage(), e.getMessage().contains("cannot be added inside a document"));
BytesReference bytes2 = XContentFactory.jsonBuilder().startObject().field("foo._ttl", 0).endObject().bytes();
mapper.parse("test", "type", "1", bytes2); // parses without error
}
}