HI all ,
I'm new to Elasticsearch, my elastic search version is 7.5.1. My requirement is to match address with existing address data.
Here is my address mapping, I'm not currently using any filters and analyzer.
Put address_mapping/
{
"mappings": {
"address_type": {
"properties": {
"home_address": {
"type": "text"
}
}
}
}
}
Existing sample address data
address/_doc/1
{ "doc_id":1,
"home_address":"A-3, apartment vortex, near by state bank of india, Thane(W)-400021"}
address/_doc/2
{
"doc_id":2,
"home_address":"B-10, apartment delux, near by state bank of baroda, Baroda-300018"
}
My address matching query
{
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "A-32, Vortex Apartment, Near by State Bank Of India, Thane (West)-400021 ",
"minimum_should_match": "90%",
"fields": [
"home_address"
]
}
}
]
}
}
}
Please help and guide me what is efficient way to near exact match these addresses with my existing mapping?