Using synonym graph filter VS adding OR clause in search query

Hi,

I am wondering is there any difference between using synonym graph filter and construct my search query adding OR clause with synonyms.

Eg. as the example described here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#query-dsl-match-query-synonyms

If I construct following queries, will result be the same?

{
   "query":{
      "bool":{
         "should":[
            {
               "match":{
                  "message":{
                     "query":"ny city"
                  }
               }
            },
            {
               "match":{
                  "message":{
                     "query":"new york city"
                  }
               }
            }
         ]
      }
   }
}

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