# Synonym example with i pod doesn't work

**URL:** <https://discuss.elastic.co/t/synonym-example-with-i-pod-doesnt-work/164420>\
**Category:** Elasticsearch\
**Created:** [January 16, 2019, 9:02am UTC](https://discuss.elastic.co/t/synonym-example-with-i-pod-doesnt-work/164420 "2019-01-16T09:02:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaKro](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MaKro](https://discuss.elastic.co/u/MaKro)\
**Post date:** [January 16, 2019, 9:02am UTC](https://discuss.elastic.co/t/synonym-example-with-i-pod-doesnt-work/164420/1 "2019-01-16T09:02:24Z")

</div>

Hi.

I have introduced the synonyms into our index. I followed steps described here:

> **[Synonym token filter | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html)**

Basically it works for most of the cases, however it doesn't work with the given example "i pod, i-pod, ipod"  
I tried it on 5.5 and additionally I have checked it on 6.5, same results on both versions.  
Can you tell me if i am doing something wrong, or this example in the docs is invalid ?  
What I am doing:  
Filter definition:

> ```
> "syn" : {
> "type" : "synonym_graph",
> "synonyms" : [
> "ipod, i-pod, i pod"
> ]
> }
> 
> ```

Analyzer:

> ```
> "my_analyzer": {
> "type": "custom",
> "tokenizer": "standard",
> "filter": [
> "lowercase",
> "english_stop",
> "edge_ngram_filter"
> ]
> },
> 
> ```

Search analyzer:

> ```
> "search_analyzer": {
> "type": "custom",
> "tokenizer": "standard",
> "filter": [
> "lowercase",
> "english_stop",
> "syn"
> ]
> }
> 
> ```

I will just add that I made it work by using custom tokenizer and fuzzy query with fuzzines set to 2, below you can find the tokenizer definition:

> ```
> "tokenizer": {
> "punctuation": { 
> "type": "pattern",
> "pattern": "[.,!?]"
> }
> },
> 
> ```

---

<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:** [January 17, 2019, 9:13am UTC](https://discuss.elastic.co/t/synonym-example-with-i-pod-doesnt-work/164420/2 "2019-01-17T09:13:39Z")

</div>

Can you also post an example document and a query that doesn't return the results you are expecting?

---

<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 14, 2019, 9:13am UTC](https://discuss.elastic.co/t/synonym-example-with-i-pod-doesnt-work/164420/3 "2019-02-14T09:13:41Z")

</div>

Closed on February 14, 2019, 9:13am UTC

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