# Restarting ES breaks nested term mapping

**URL:** <https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669>\
**Category:** Elasticsearch\
**Created:** [June 30, 2015, 10:54pm UTC](https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669 "2015-06-30T22:54:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grokling](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Grokling](https://discuss.elastic.co/u/Grokling)\
**Post date:** [June 30, 2015, 10:54pm UTC](https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669/1 "2015-06-30T22:54:38Z")

</div>

I have Couchdb\_changes in logstash feeding ES. I've got 242 docs being indexed currently in my dev environment.

I restarted my ES docker container, and my searches stopped working as they had been.

Prior to restarting (and again after I trashed and rebuilt my index from scratch)  
curl [http://localhost:9200/hx/logs/\_search?pretty=true&q=](http://localhost:9200/hx/logs/_search?pretty=true&q=)_:_ gives me 242 hits  
curl [http://localhost:9200/hx/\_search?q=class:section](http://localhost:9200/hx/_search?q=class:section) returns the expected document as a hit.  
curl [http://localhost:9200/hx/\_search?q=\_id:s1](http://localhost:9200/hx/_search?q=_id:s1) returns the expected document as a hit.

After a restart of the docker container:  
curl [http://localhost:9200/hx/logs/\_search?pretty=true&q=](http://localhost:9200/hx/logs/_search?pretty=true&q=)_:_ gives me 242 hits  
curl [http://localhost:9200/hx/\_search?q=class:section](http://localhost:9200/hx/_search?q=class:section) returns zero hits.  
curl [http://localhost:9200/hx/\_search?q=doc.class:section](http://localhost:9200/hx/_search?q=doc.class:section) returns the expected document as a hit. (note the inclusion of "doc" in the term)

Full results are at [https://gist.github.com/Grokling/b37a145c73156199cec1](https://gist.github.com/Grokling/b37a145c73156199cec1)

I'd love to hear how I can retain this functionality through a restart, or get it back after a restart without destroying and reloading the index.

---

<div class="post-metadata">

**Author:** ![Grokling](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Grokling](https://discuss.elastic.co/u/Grokling)\
**Post date:** [July 1, 2015, 1:36am UTC](https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669/2 "2015-07-01T01:36:06Z")

</div>

This issue has now been confirmed on a different machine.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 1, 2015, 5:11am UTC](https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669/3 "2015-07-01T05:11:00Z")

</div>

Can you get the mapping before and after the restart?

That's super strange.

Also could you try the same with 1.6.0

---

<div class="post-metadata">

**Author:** ![Grokling](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Grokling](https://discuss.elastic.co/u/Grokling)\
**Post date:** [July 1, 2015, 11:03pm UTC](https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669/5 "2015-07-01T23:03:08Z")

</div>

I've just tried with ES 1.6.0, and have not been able to reproduce the issue.

Guess I just upgraded versions. Good suggestion, thanks.

---

<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:** [July 6, 2017, 12:04am UTC](https://discuss.elastic.co/t/restarting-es-breaks-nested-term-mapping/24669/6 "2017-07-06T00:04:04Z")

</div>


