# Error when creating index with synonyms file

**URL:** <https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484>\
**Category:** Elasticsearch\
**Created:** [August 8, 2018, 10:11am UTC](https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484 "2018-08-08T10:11:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ong/32/40766_2.png) [@Ong](https://discuss.elastic.co/u/Ong)\
**Post date:** [August 8, 2018, 10:11am UTC](https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484/1 "2018-08-08T10:11:37Z")

</div>

I am creating an index mapping which uses a synonyms file.

The synonyms file contents are as follows:

```
ms, microsoft
usa, united states of america

```

When I tried to create the index, an error was returned.

```
"reason": "term: united states of america analyzed to a token (united states) with position 
increment != 1 (got: 0)"

```

What does the message mean and what is the correct format for the synonyms file?

---

<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:** [September 5, 2018, 10:11am UTC](https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484/2 "2018-09-05T10:11:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [September 26, 2018, 3:19pm UTC](https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484/3 "2018-09-26T15:19:18Z")

</div>



---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [September 26, 2018, 3:23pm UTC](https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484/4 "2018-09-26T15:23:31Z")

</div>

Are you using a stopword filter (probably the english one) in your analysis chain? Could you post your full analysis settings you use (or at least the analyzer that uses the synonyms and its filters)?

---

<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:** [November 4, 2022, 5:31am UTC](https://discuss.elastic.co/t/error-when-creating-index-with-synonyms-file/143484/5 "2022-11-04T05:31:43Z")

</div>


