Synonyms Issue
I have configured Nuxeo/Elasticsearch via the “elasticsearch-config.xml.nxftl” file to use synonyms via a synonyms.txt file. It's a simple synonym file using only two words for now but it is not working. When I query Elasticsearch via http://localhost:9200/nuxeo/_settings?pretty is shows that the synonyms filter is there and that it is also in the analyzer.
I have two documents uploaded into Nuxeo. They are text files and each contain a synonym word.
My synonyms.txt file looks as follows: foo => bar.
But when I search for “foo” it only returns the document with “foo” in it. Likewise when I search for “bar” only the document with “bar” in it is returned. If I understand this right searching for “foo” should return both documents.
I've tried everything I can think of including delete the elasticsearch index and then restart Nuxeo. Indexes are re-created and everything starts up fine.
Does anyone have any feedback as to what I may be doing wrong?
Answering my own question! It turns out that I had words with hyphens in my synonyms file: Like “foo-bar.” You have to configure the analyzer in Elasticsearch to be able to deal with this.
Thanks for the info! Sorry if I appeared rude. I did not know Nuxeo employees were on the site.
Do these questions get answered on a timely basis? Not seeing any answers to questions recently.