# Defying synonyms for roman numbers doesn't seem to work

**URL:** <https://discuss.elastic.co/t/defying-synonyms-for-roman-numbers-doesnt-seem-to-work/291126>\
**Category:** Elasticsearch\
**Created:** [December 7, 2021, 1:53pm UTC](https://discuss.elastic.co/t/defying-synonyms-for-roman-numbers-doesnt-seem-to-work/291126 "2021-12-07T13:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eliezra236](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliezra236/32/78034_2.png) [@eliezra236](https://discuss.elastic.co/u/eliezra236)\
**Post date:** [December 7, 2021, 1:53pm UTC](https://discuss.elastic.co/t/defying-synonyms-for-roman-numbers-doesnt-seem-to-work/291126/1 "2021-12-07T13:53:09Z")

</div>

Hi,

I've been trying to set up roman numbers synonyms the following way:

```auto
PUT testing_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_custome_analyzer": {
          "type": "custom",
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "roman_letters_synonyms"
          ]
        }
      },
      "filter": {
        "roman_letters_synonyms": {
          "type": "synonym_graph",
          "synonyms": [
            "5 => v"
          ]
        }
      }
    }
  }
}

POST testing_index/_doc
{
  "name": "Grand Theft Auto V"
}

GET testing_index/_search 
{
  "query": {
    "match_phrase": {
      "name": "5"
    }
  }
}

```

But the last queue doesn't return the expected result.  
What am I doing wrong here?

---

<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:** [December 8, 2021, 9:14am UTC](https://discuss.elastic.co/t/defying-synonyms-for-roman-numbers-doesnt-seem-to-work/291126/2 "2021-12-08T09:14:32Z")

</div>

Have you set `my_custome_analyzer` as the analyzer of the "name" field? You would do that in your mappings. Please post them if you did and are still experiencing this problem, its easier to re-create things that way.

---

<div class="post-metadata">

**Author:** ![eliezra236](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliezra236/32/78034_2.png) [@eliezra236](https://discuss.elastic.co/u/eliezra236)\
**Post date:** [December 8, 2021, 10:18am UTC](https://discuss.elastic.co/t/defying-synonyms-for-roman-numbers-doesnt-seem-to-work/291126/3 "2021-12-08T10:18:09Z")

</div>

I see, I thought that by defying it there it would be set automaticly.  
I set it as the index default and it fixed the problem.  
Thank you

---

<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:** [January 5, 2022, 10:19am UTC](https://discuss.elastic.co/t/defying-synonyms-for-roman-numbers-doesnt-seem-to-work/291126/4 "2022-01-05T10:19:02Z")

</div>

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