# Generating same token for related words

**URL:** <https://discuss.elastic.co/t/generating-same-token-for-related-words/351902>\
**Category:** Elasticsearch\
**Created:** [January 26, 2024, 9:15pm UTC](https://discuss.elastic.co/t/generating-same-token-for-related-words/351902 "2024-01-26T21:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [January 26, 2024, 9:15pm UTC](https://discuss.elastic.co/t/generating-same-token-for-related-words/351902/1 "2024-01-26T21:15:51Z")

</div>

Hello everybody.

I would like to know if it is possible using analyzer to generate the same token for the following words: "bronzeadora", "bronze", "bronzeado". The token I need for the three words would be "bronz".

I tried using the stemmer filter but I was unsuccessful as you can see:

```auto
GET _analyze
{
  "text": [
    "bronzeadora",
    "bronze",
    "bronzeado"
  ],
  "tokenizer": "standard",
  "filter": [
    {
      "type": "stemmer",
      "language": "brazilian"
    }
  ]
}

```

Token:

```auto
{
  "tokens": [
    {
      "token": "bronzeador",
      "start_offset": 0,
      "end_offset": 11,
      "type": "<ALPHANUM>",
      "position": 0
    },
    {
      "token": "bronz",
      "start_offset": 12,
      "end_offset": 18,
      "type": "<ALPHANUM>",
      "position": 101
    },
    {
      "token": "bronze",
      "start_offset": 19,
      "end_offset": 28,
      "type": "<ALPHANUM>",
      "position": 202
    }
  ]
}

```

I know I can solve the problem with synonyms but I wanted to make sure there isn't some other filter.

---

<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:** [February 23, 2024, 9:16pm UTC](https://discuss.elastic.co/t/generating-same-token-for-related-words/351902/2 "2024-02-23T21:16:44Z")

</div>

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