# General Hierarchical Document Advice

**URL:** <https://discuss.elastic.co/t/general-hierarchical-document-advice/132967>\
**Category:** Elasticsearch\
**Created:** [May 23, 2018, 9:39am UTC](https://discuss.elastic.co/t/general-hierarchical-document-advice/132967 "2018-05-23T09:39:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Russell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dave_russell/32/42250_2.png) [@Dave\_Russell](https://discuss.elastic.co/u/Dave_Russell)\
**Post date:** [May 23, 2018, 9:39am UTC](https://discuss.elastic.co/t/general-hierarchical-document-advice/132967/1 "2018-05-23T09:39:37Z")

</div>

I'm trying to index relational data directly into ElasticSearch. As part of my index creation I am trying to prevent the unnecessary duplication that backreferences (eg OrderLine \> Order \> Customer \> Orders \> Order \> Orderline) cause by adding IGNOREs to the mappings.

I have defined in the connection settings DefaultMappings for the main document I'm indexing and each of the nested classes inside my main document. In these I am declaring multiple fields to IGNORE.....But all these fields are still included in my index metadata when they form part of the document hierarchy?

How do I tell ES to ignore these related entities in a hierarchical document being indexed?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2018, 9:39am UTC](https://discuss.elastic.co/t/general-hierarchical-document-advice/132967/2 "2018-06-20T09:39:37Z")

</div>

Closed on June 20, 2018, 9:39am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
