Here is the type of document i have:
{
"id": 41,
"invoice_number": "INV-0022",
"order_number": null,
"status": "Draft",
"object_id": "invoice_41",
"viewed_date": null,
"total_amount": 21640,
"total_amount_formatted": "₹ 21,640.00",
"invoice_date_formatted": "16/08/23",
"customer_viewed": null,
"viewed_date_formatted": false,
"balance_due": 21640,
"balance_due_formatted": "₹ 21,640.00",
"due_date_formatted": "16/08/23",
"customer_id": 3,
"updated_at": "2016-08-24 19:41:59",
"created_at": "2016-08-23 16:39:57",
"recurring_id": null,
"party": {
"display_name": "MANI RAM BALWANT RAI",
"contacts": [
{
"name": "BALWANT",
"email": "EFF@GMAIL.COM",
"mobile": "9988000000",
"phone": "2533433"
}
]
},
"status_formatted": "Draft",
"tags": [
"invoice"
,
"organization_id_11"
,
"Draft"
]
},
"sort": [
1471970397000
]
}
Here is my query:
{
"query": {
"multi_match": {
"query": "ram",
"fields": [
"invoice_number",
"status",
"party.display_name",
"party.contacts"
]
}
},
"sort": {
"created_at": "desc"
}
}
When i have query "ram" it results perfectly fine. But when my query is "EFF@GMAIL.COM", it is not resulting any hits. Here i'm expecting this to be searched in array of party.contacts. I don't know how to refer all elements of party.contacts field.
Any reference will be helpful.
Thanks