I work with address searching. and I want to search with two formats (multiple values) of an adress using multiple fields. adress is a text input not a keyword.
For example :
user_address = 88 South East Street Raeford, NC 28376
formated_address = 88 SE ST Raeford, NC 28376
and I want to search with theses two values using field_1 and field_2.
This appoach worked for specif value/keyword like ids. but didn't work for text values like address
{
"query": {
"match": {
"id": {
"query": "111111 22222",
"operator": "or"
}
}
}
}
I tried using bool with must , but did'nt work because must like AND , and if one is false, will return nothing ; something like this :
{
"query": {
"bool": {
"must": [
{"match": {"field_1": "88 South East Street Raeford, NC 28376"}},
{"match": {"field_2": "88 SE ST Raeford, NC 28376"}}
]
}
}
}
I tried using should, but give me more results and not specific results, that exactly match the required solutions.
I know that we can use match_multiple with multiple fields. Can I use it for multiple values ? if yes, How ?
Please who has any ideas, how to fix this issues, or any out of boxes ideas.
Thanks.