Hello, I'm running a search engine with Elasticsearch 6.5 using flask (Python) where documents were indexed with a synonym analyzer, but when installing the application on another server I cannot connect to the synonym file.
Running:
RequestError (400, 'search_phase_execution_exception', '[match] analyzer [synonym] not found')
This is why I believe the problem is in accessing my synonym file.
Can you advise on tests I should run on this particular server to examine if that is the case or what could be the source for the problem?
Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Or use markdown style like:
```
CODE
```
This is the icon to use if you are not using markdown format:
There's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Thanks for the comment and sorry for missing the formatting issue.
Did I answer your question about the index? Do you have an idea about why ES works differently on different servers?
Thanks for the reminder. Rony is not available right now and he asked me to update this discussion.
Kibana is not installed on the system. I ran the query with curl with the following results:
I formatted the json of our query as below. Is it possible that the structure of the query is causing the problem. e.g "analyzer":"synonym" should not be in the place it is?
Correct, I don't see the analyzer but it should be there as this is the json used to build it:
{
"settings":{
"index":{
"analysis":{
"analyzer":{
"synonym":{
"tokenizer":"whitespace",
"filter":[
"synonym"
]
}
},
"filter":{
"synonym":{
"type":"synonym",
"synonyms_path":"analysis/aaa_syn.txt"
}
}
}
}
}
}
The file exists in the config\analysis directory.
What am I doing wrong!
As usual the simplest things are the last we try! I deleted the index and rebuilt it and it is now working.
Thank you for your very prompt and useful help!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.