# Elasticsearch synonym\_graph filter not giving all tokens

**URL:** <https://discuss.elastic.co/t/elasticsearch-synonym-graph-filter-not-giving-all-tokens/251583>\
**Category:** Elasticsearch\
**Created:** [October 9, 2020, 2:59pm UTC](https://discuss.elastic.co/t/elasticsearch-synonym-graph-filter-not-giving-all-tokens/251583 "2020-10-09T14:59:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhiru9895](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dhiru9895](https://discuss.elastic.co/u/Dhiru9895)\
**Post date:** [October 9, 2020, 2:59pm UTC](https://discuss.elastic.co/t/elasticsearch-synonym-graph-filter-not-giving-all-tokens/251583/1 "2020-10-09T14:59:29Z")

</div>

I'm trying to use synonym\_graph filter in the analyzer but it is not generating the result we need.

This is my curl command to analyze text:

```auto
curl -X GET "localhost:9200/_analyze?pretty" -H 'Content-Type: application/json' -d'
{
   "tokenizer": "whitespace",
   "filter": [
   
      {
       "type": "synonym_graph",
       "lenient": true,
       "synonyms": ["one market,responsis", "one,1"]
      }
   ],
   "text": "responsis"
}'

```

I got analyzed tokens: **one** , **responsis** and **market**

Given response:

```auto
{
  "tokens" : [
    {
      "token" : "one",
      "start_offset" : 0,
      "end_offset" : 9,
      "type" : "SYNONYM",
      "position" : 0
    },
    {
      "token" : "responsis",
      "start_offset" : 0,
      "end_offset" : 9,
      "type" : "word",
      "position" : 0,
      "positionLength" : 2
    },
    {
      "token" : "market",
      "start_offset" : 0,
      "end_offset" : 9,
      "type" : "SYNONYM",
      "position" : 1
    }
  ]
}

```

But i want the analyzed tokens to be: **Responis** , **One** , **Market** and **1**

Some how it is not giving all tokens to generate the result.

**[Note: I don't want to add synonyms in one group.]**

Thank you for your answer in advance.

---

<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 6, 2020, 2:59pm UTC](https://discuss.elastic.co/t/elasticsearch-synonym-graph-filter-not-giving-all-tokens/251583/2 "2020-11-06T14:59:38Z")

</div>

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