I want to pass nested query to elasticsearch from my laravel controller. my simple query is like
Simple Query
$params = [
'index' => 'my_index',
'type' => 'product',
'body' => [
'query'=>[
'match'=>[
'title'=>'first'
]
]
]
];
$response = \Es::Search($params); //passing query from here
It is working perfect.
How can i pass following nested query to \Es::Search($params); ?
My Nested Query :
{
"query": {
"nested": {
"path": "sku",
"query": {
"bool": {
"must": [
{ "match": {"sku.price": "50"}}
]
}
}
}
}
}
I am new in elasticsearch so please give some suggestions.