As you can see, when a concept doesn’t have any available synonym, we can just repeat it.
Solr users only: don’t forget the following things:
- the request handler should use an edismax or lucene query parser, and the SplitOnWhiteSpace flag (sow) must be set to true
- the field type which includes the synonyms graph filter must have the autoGeneratePhraseQueries set to true
You can read more here [1] about this approach.
Note: this will work until the Lucene SynonymMap uses a List/Array for collecting the synonyms associated with a given concept. When and if the implementation will switch to a Set-like approach, there’s a high chance this trick will stop working.