# (IOException while reading synonyms\_path\_path) synonym token filter configuration

**URL:** <https://discuss.elastic.co/t/ioexception-while-reading-synonyms-path-path-synonym-token-filter-configuration/197764>\
**Category:** Elasticsearch\
**Created:** [September 3, 2019, 6:37am UTC](https://discuss.elastic.co/t/ioexception-while-reading-synonyms-path-path-synonym-token-filter-configuration/197764 "2019-09-03T06:37:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meet\_Chaudhary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meet_chaudhary/32/46467_2.png) [@Meet\_Chaudhary](https://discuss.elastic.co/u/Meet_Chaudhary)\
**Post date:** [September 3, 2019, 6:37am UTC](https://discuss.elastic.co/t/ioexception-while-reading-synonyms-path-path-synonym-token-filter-configuration/197764/1 "2019-09-03T06:37:06Z")

</div>

I am using synonyms token filter with custom file

installed elasticsearch 6.7 as a service on windows 10 machine  
my "synonyms.txt" is located at "C:\ProgramData\Elastic\Elasticsearch\config\analysis\synonyms.txt"

here is my index settings

```
PUT /synonyms
{
"settings": {
"analysis": {
"filter": {
"synonym": {
"type": "synonym",
"synonyms_path": "analysis/synonyms.txt"
}
},
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"synonym"
]
}}
}
},
"mappings": {
"_doc": {
"properties": {
"description": {
"type": "text",
"analyzer": "my_analyzer"
}
}
}
}
}

```

i am getting this error while creating above index  
{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "IOException while reading synonyms\_path\_path: C:\ProgramData\Elastic\Elasticsearch\config\analysis\synonyms.txt"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "IOException while reading synonyms\_path\_path: C:\ProgramData\Elastic\Elasticsearch\config\analysis\synonyms.txt",  
"caused\_by": {  
"type": "no\_such\_file\_exception",  
"reason": "C:\ProgramData\Elastic\Elasticsearch\config\analysis\synonyms.txt"  
}  
},  
"status": 400  
}

also tried synonyms token filter in elasticsearch installed as archive distribution (.zip) on windows machine but getting same error  
but in linux machine for both archive as well as package distributions it is working.

Thanks in advance.happy searching

---

<div class="post-metadata">

**Author:** ![Meet\_Chaudhary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meet_chaudhary/32/46467_2.png) [@Meet\_Chaudhary](https://discuss.elastic.co/u/Meet_Chaudhary)\
**Post date:** [September 3, 2019, 12:16pm UTC](https://discuss.elastic.co/t/ioexception-while-reading-synonyms-path-path-synonym-token-filter-configuration/197764/2 "2019-09-03T12:16:03Z")

</div>

the problem here is the file extensions are hidden from control panel.so you can just go to control panel\>file explorer options\> click on view tab there uncheck option(hide extension for known file types) [it should look something like this](https://i.stack.imgur.com/hvDnD.png) now rename your file accordingly and try again

---

<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 1, 2019, 12:16pm UTC](https://discuss.elastic.co/t/ioexception-while-reading-synonyms-path-path-synonym-token-filter-configuration/197764/3 "2019-10-01T12:16:05Z")

</div>

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