# Es5 index creation hanging

**URL:** <https://discuss.elastic.co/t/es5-index-creation-hanging/84747>\
**Category:** Elasticsearch\
**Created:** [May 5, 2017, 2:51pm UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747 "2017-05-05T14:51:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fguery](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@fguery](https://discuss.elastic.co/u/fguery)\
**Post date:** [May 5, 2017, 2:51pm UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747/1 "2017-05-05T14:51:01Z")

</div>

Hello,  
We encountered an issue back in 5.0/5.1 that ElasticSearch was not able to create an index if the mapping contained lots of synonyms.  
We are still pushing all the synonyms directly via the mapping, and while this solution worked fine on 5.2 it stopped working on 5.3 and 5.4.

I also have to say that the synonym list is not that huge; the whole \_cluster/state is only 2 megabytes (we have 2 indices containing the synonym list, so I'd assume it's around 1M per index)

Here is the topic we opened back then [200% CPU - Elasticsearch 5 index creation very slow with a huge synonyms list](https://discuss.elastic.co/t/200-cpu-elasticsearch-5-index-creation-very-slow-with-a-huge-synonyms-list/69052)

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [May 5, 2017, 4:47pm UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747/2 "2017-05-05T16:47:43Z")

</div>

> [@fguery](#):
>
> We are still pushing all the synonyms directly via the mapping, and while this solution worked fine on 5.2 it stopped working on 5.3 and 5.4.

I'm sorry that you're having trouble. We can not help you unless you're specific about what you're doing, what you expect to happen, and what is actually happening.

---

<div class="post-metadata">

**Author:** ![teseo](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@teseo](https://discuss.elastic.co/u/teseo)\
**Post date:** [May 8, 2017, 8:22am UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747/3 "2017-05-08T08:22:52Z")

</div>

Hello @jasontedor in this [link](https://discuss.elastic.co/t/200-cpu-elasticsearch-5-index-creation-very-slow-with-a-huge-synonyms-list/69052) you can find detailed information of the problem. Pretty much in the latest version, the changes that solved the problem no longer seems to work.

---

<div class="post-metadata">

**Author:** ![fguery](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@fguery](https://discuss.elastic.co/u/fguery)\
**Post date:** [May 8, 2017, 9:24am UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747/4 "2017-05-08T09:24:20Z")

</div>

Hello @jasontedor, thanks for replying. Do you need an excerpt of the mapping? It's fairly standard I think, we have some keep words, some synonyms, etc. A few thousands (in total about 50K I think) across multiple analyzers.

```
  "job_title_keep": {
    "type": "keep",
    "keep_words_case": false,
    "keep_words": %%job_title_keep%%
  },
  "job_title_synonyms": {
    "tokenizer": "whitespace",
    "type": "synonym",
    "synonyms": %%job_title_synonyms%%
  },
  "job_org_keep": {
    "type": "keep",
    "keep_words": %%job_org_keep%%,
    "keep_words_case": false
  },
  "job_org_synonyms": {
    "type": "keep",
    "keep_words": %%job_org_keep%%,
    "keep_words_case": false
  },
  "language_keep": {
    "type": "keep",
    "keep_words": %%language_keep%%,
    "keep_words_case": false
  },
  "degree_keep": {
    "type": "keep",
    "keep_words": %%degree_keep%%,
    "keep_words_case": false
  },

```

On the above excerpt, we replace the %%...%% by synonym list, solr format, or keep/stop words

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [May 13, 2017, 9:29pm UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747/5 "2017-05-13T21:29:17Z")

</div>

When the index creation is hung, would you please stack dump the process (use `jstack`) and use the hot threads API and share the result here?

---

<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 10, 2017, 9:38pm UTC](https://discuss.elastic.co/t/es5-index-creation-hanging/84747/6 "2017-06-10T21:38:53Z")

</div>

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