Synonym filter and preserve originals

Hi there!

I'm using elasticsearch for full-text front end search and have set up a custom search analyser with a large solr-format synonym filter attached. Unfortunately, some of these synonyms address business cases while others actually hinder search results. This file is massive and cannot be easily fixed, however: keeping the original tokens in addition to synonym results would solve most of our problems.

However, it seems that regarding the synonym filter my options are severely limited.
I have tried:

  1. multiplexer filter - does not work for most cases as we have plenty of multi-term synonym entries
  2. keyword repeat - incompatible with search
  3. synonym graph shows the same behaviour (expected, but I guess I had to try)

Is there any way to do this? The only viable option we seem to have left is to use copy_to to copy to separate field without synonyms and a different search analyser. This is seems rather cumbersome and and not great performance wise.

Please let me know if there's an easier way to achieve this - maybe I've missed a config value somewhere?

Thanks :slight_smile:

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