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?

0 votes

3 answers



Assuming this is all done in ElasticSearch but seems weird that it doesn't work easier via Nuxeo . . .

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.

0 votes

Thanks for the info! Sorry if I appeared rude. I did not know Nuxeo employees were on the site.

0 votes

No, you weren't rude at all. I just wanted to post to make sure that we do try to answer here but our first priority is our day to day job of looking after customers with support subscriptions which I am sure you will understand.

Do these questions get answered on a timely basis? Not seeing any answers to questions recently.

0 votes

There are no guarantees on responses here, this is a community driven site. Nuxeo employees will jump in from time to time depending on availability etc. Our support services are dedicated to those who need timely responses for mission critical projects.

Totally understand! Thanks again for the clarification.