Given I have records with following structure:
{ ... ,
"CustomerInfo": {
"GasStation": {
"cardID": "abc123456"
}
}
}
{ ... ,
"CustomerInfo": {
"SuperMarket": {
"cardID": "abc123456"
}
}
}
{ ... ,
"CustomerInfo": {
"School": {
"cardID": "dfg789456"
}
}
}
Currently I'm using this
{
"query": {
"bool": {
"should": [
{
"CustomerInfo.GasStation.cardID": "*12345*"
},
{
"CustomerInfo.SuperMarket.cardID": "*12345*"
},
{
"CustomerInfo.Schools.cardID": "*12345*"
}
],
"minimum_should_match": 1
}
}
}
Is it possible to filter by cardID only?
Do we have a matcher to find using something like "CustomerInfo.*.cardID"
?