I am trying to add synonyms to elastic search as show in this link using a file but it gives me the following error https://www.elastic.co/guide/en/elasticsearch/reference/5.2/analysis-synonym-tokenfilter.html
error":{"root_cause":[{"type":"illegal_argument_exception","reason":"IOException while reading synonyms_path_path: ],"type":"illegal_argument_exception","reason":"IOException while reading synonyms_path_path: (No such file or directory)"}},"status":400}
My mapping code looks like this and synonyms.txt is within the same folder (same level):
'settings': {
'analysis': {
'filter': {
'english_stemmer': {
'type': 'stemmer',
'language': 'english'
},
'english_possessive_stemmer': {
'type': 'stemmer',
'language': 'possessive_english'
},
'my_synonyms': {
'type': 'synonym',
'synonyms_path' : 'synonyms.txt'
}
},
'analyzer': {
'my_analyzer': {
'tokenizer': 'standard',
'filter': [
'english_possessive_stemmer',
'lowercase',
'my_synonyms',
'english_stemmer'
]
}
}
}
},
'mappings' : ...