# Upgrading from 2.4 -\> 7.9, Synonym reserved words?

**URL:** <https://discuss.elastic.co/t/upgrading-from-2-4-7-9-synonym-reserved-words/250197>\
**Category:** Elasticsearch\
**Created:** [September 28, 2020, 1:50pm UTC](https://discuss.elastic.co/t/upgrading-from-2-4-7-9-synonym-reserved-words/250197 "2020-09-28T13:50:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronchalant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronchalant/32/3611_2.png) [@ronchalant](https://discuss.elastic.co/u/ronchalant)\
**Post date:** [September 28, 2020, 1:50pm UTC](https://discuss.elastic.co/t/upgrading-from-2-4-7-9-synonym-reserved-words/250197/1 "2020-09-28T13:50:11Z")

</div>

We're doing a big upgrade on various indexes, going from 2.4 -\> 7.9.

One thing we're running into is we had a number of synonyms that had the words 'and' and 'or' in them, and they're being rejected by 7.9.

One of them is kind of important: it creates a synonym for OR to be OREGON.

I have not been able to find much in the way of documentation for this change to how synonyms are treated. Can anyone provide any insight on how we might handle things like this in the new version?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 29, 2020, 2:32am UTC](https://discuss.elastic.co/t/upgrading-from-2-4-7-9-synonym-reserved-words/250197/2 "2020-09-29T02:32:14Z")

</div>

Can't comment on potential changes sorry.  
What errors are you seeing with the rejections? How are you posting them, can you share an example?

---

<div class="post-metadata">

**Author:** ![ronchalant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronchalant/32/3611_2.png) [@ronchalant](https://discuss.elastic.co/u/ronchalant)\
**Post date:** [October 1, 2020, 1:22pm UTC](https://discuss.elastic.co/t/upgrading-from-2-4-7-9-synonym-reserved-words/250197/3 "2020-10-01T13:22:35Z")

</div>

> [@warkolm](#):
>
> omment on potential changes sorry.  
> What errors are you seeing with the rejections? How are you posting them, can you share an example?

Here is the response:

```auto
{
  "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 204",
      "caused_by" : {
        "type" : "illegal_argument_exception",
        "reason" : "term: as was completely eliminated by analyzer"
      }
    }
  },
  "status" : 400
}

```

That is for lines like:

```auto
or, operating room
as, american samoa

```

I realize these are probably relatively useless as synonyms in conjunction with stop words, but what I don't really see anywhere is any sort of documentation around this change?

---

<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:** [October 29, 2020, 1:22pm UTC](https://discuss.elastic.co/t/upgrading-from-2-4-7-9-synonym-reserved-words/250197/4 "2020-10-29T13:22:43Z")

</div>

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