Having elastic search query as below -
{
"query": {
"bool": {
"must": {
"query": "*Hanry Oliver 45354*",
"fields": [
"firstName",
"lastName",
"customerNo"
],
"default_operator": "AND"
}
}
}
}
This results in one record which is correct. But if uses -
"query":{
"bool":{
"must":{
"query":"*Han Ol 453*",
"fields":[
"firstName",
"lastName",
"customerNo"
],
"default_operator":"AND"
}
}
}
}
It results in no records, whereas it should match "Hanry Oliver 45354". If and operator is removed, it results in all records having match han or ol or 453 whereas looking for query result having and- han and Ol and 453
Could someone help what query should be used in this case ?