As far as I know it is not possible in Elasticsearch to assign weight to Synonyms which is available in Lucene as well as Solr.
There is one workaround you can use at query time and it will boost the document for actual query and lower boost of synonyms keyword.
Let consider, you have field name title
and define with the search or index time synonyms filter. You can add actual query to should clause for same with standard
analayzer.
{
"query": {
"bool": {
"must": [
{
"match": {
"title": "honey"
}
}
],
"should": [
{
"match": {
"title": {
"query": "honey",
"analyzer": "standard"
}
}
}
]
}
}
}