Atlas Autocomplete Search

Hi @Elle_Shwer
the blog is not accessible. Please provide the permission

this is the index definition

{
  "mappings": {
    "dynamic": true,
    "fields": {
      "searchKey": [
        {
          "dynamic": true,
          "type": "document"
        },
        {
          "type": "autocomplete"
        }
      ]
    }
  }
}

So problem statement is that I want to use autocomplete to search the zip code and city. So I created a “searchKey” in each document which will be a combination of zip code and city name. For Eg, if the zip code is “1234” and the city is “ABC” then “searchKey” in that document will be “1234 ABC”. So that I can perform the search on the single key. Then I create the search index on it. Index definition is done above.