# Issue with combining synonyms and compound words

**URL:** <https://discuss.elastic.co/t/issue-with-combining-synonyms-and-compound-words/123758>\
**Category:** Elasticsearch\
**Created:** [March 13, 2018, 3:08pm UTC](https://discuss.elastic.co/t/issue-with-combining-synonyms-and-compound-words/123758 "2018-03-13T15:08:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![derk](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@derk](https://discuss.elastic.co/u/derk)\
**Post date:** [March 13, 2018, 3:08pm UTC](https://discuss.elastic.co/t/issue-with-combining-synonyms-and-compound-words/123758/1 "2018-03-13T15:08:01Z")

</div>

I'm trying to combine a synonym token filter and a decompound word token filter.  
To create the index, I used something similar to the following.

```auto
PUT /test_index
{
  "settings": {
    "index": {
      "analysis": {
        "filter": {
          "synonym": {
            "type": "synonym",
            "synonyms": [
              "militärgeschichte, kriegsgeschichte"
            ]
          },
          "decompound": {
            "type": "dictionary_decompounder",
            "word_list": [
              "geschichte"
            ]
          }
        },
        "analyzer": {
          "my_breaking_analyzer": {
            "type": "custom",
            "tokenizer": "keyword",
            "filter": [
              "decompound",
              "synonym"
            ]
          }
        }
      }
    }
  }
}

```

However, in ES 6.2 I'm getting the following error.

```auto
PUT /test_index
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "failed to build synonyms"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "failed to build synonyms",
    "caused_by": {
      "type": "parse_exception",
      "reason": "Invalid synonym rule at line 1",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "term: militärgeschichte analyzed to a token (geschichte) with position increment != 1 (got: 0)"
      }
    }
  },
  "status": 400
}

```

Is this a known issue?

---

<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:** [April 10, 2018, 3:08pm UTC](https://discuss.elastic.co/t/issue-with-combining-synonyms-and-compound-words/123758/2 "2018-04-10T15:08:15Z")

</div>

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