Search for an address

Hello,

I have an address in a nested object where number, road name, postal code and city are each in a specific field.

What is the best way to make search request from query like " 4 Brooklyn Rd Bromley" ?

Thanks for your help

In one of the talk I gave recently, I proposed this:

GET bano/_search
{
  "size": 1, 
  "query": {
    "multi_match": {
      "query": "4 Brooklyn Rd Bromley",
      "fields": [
        "address.city",
        "address.street_name",
        "address.number"
      ],
      "type": "most_fields"
    }
  }
}

Source:

Note that I was using synonyms for the street name as road and rd might be the same thing.

HTH

Great !

Thanks a lot

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