I am testing the usage of a custom analyzer with a Synonym token filter.
At search time I would like to have more relevance on documents which match the original term rather than the synonym. Which approach I have to use?
Thanks in advance
I thought this solution:
-the synonym analyzer is applied only at query time
-using a boolean query combining 2 query, one with a must clause using analyzer with synonyms and onother with should clause wich use analyzer without synonyms. In this way terms which match both clauses takes more relevance.
Does it make sense? There are side effects?
Someone can help?
The approach of running user search string input as multiple clauses (fuzzy, phrase, synonym) simultaneously as a big
should array is valid. The more of the clauses that match the better and you could even artificially apply
boost settings to the preferred interpretations.
Also consider that some queries are more expensive than others  and that the more expensive ones such as phrase queries can be run more cheaply if they are only applied to the top N matches produced by cheaper queries by using the rescore  query type.
thank you very much for your contribution, Mark