Custom analyzer synonym issue: Astoria → Queens also matches Queens Village

I am using a match search for a city called Astoria, and I am using a custom analyzer for cities. When I search for Astoria, the analyzer will return Queens. Queens is returning just fine. However, because it matches Queens, it also returns cities like Queens Village. Is there a way to change the query so that Queens Village doesnt return, ideally an option that wouldnt require reindexing all fields? And only the cities specified in the query or analyzer match? So it should match for all cities in the custom analyzer and Astoria.

{
    "bool": {
        "must": [
            {
                "match": {
                    "full_name": {
                        "query": "Bob",
                        "analyzer": "nickname_analyzer",
                    }
                }
            },
            {
                "bool": {
                    "must": [
                        {
                            "match": {
                                "city": {
                                    "query": "astoria",
                                    "operator": "or",
                                    "analyzer": "city_analyzer",
                                }
                            }
                        }
                    ]
                }
            },
        ],
    }
}

Hello @william1349

Welcome to the community!!

Could you please confirm if the field city is stored as keyword as well?

If yes i think below logic could be used to query :

"filter": [
        {
          "bool": {
            "must_not": [
              {
                "regexp": {
                  "city.keyword": ".*\\s.*"
                }
              }
            ]
          }
        }
      ]

Thanks!!