The json looks like this
{
"company": {
"type": "SME",
"name": "Taylor Corps"
},
"contact": {
"tel": "5334234234",
"name": "Jane Doe"
},
"affiliates": {
"org": "Taylor Corps"
}
}
image I want to filter
out all the people who has "Taylor" in their company.name
or affiliates.org
.
I tried multi_field
in a bool filter
doesn't seem working in filter.
Any advice?
Thank you!
答案 0 :(得分:0)
使用以下查询:
{
"query": {
"query_string": {
"fields": [
"company.name" , "affiliates.org"
],
"query": "Taylor"
}
}
}