Synonym list with multi word values

Hi there,

Reading the elasticsearch documentation, it seems that due to the way the synonyms file is tokenized, it is really difficult (maybe even impossible) to have a synonyms list that has multi word values. Could one of you experts confirm if the following scenario is indeed impossible or if it can be realised somehow with the synonyms functionality configuration?

What I am after is as follows:

I have the following synonyms file:

word1, word2 word3, word4

I am trying to achieve the following:

  1. If I search for word1, I am expecting all documents containing word1, word4 or "word2 word3".
  2. If I search for "word 2 word3", I am expecting all documents containing word1, word4 or "word2 word3".

Massive thanks for your help on this in advance!

Cheers,

Olli

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