I am writing Elasticsearch aggregations queries to find the total count available:
GET zap/_search
{
"aggregations": {
"Brand_Name_Count": {
"terms": {"field": "brand_name", "size" : 0}
},
"Stock_Status_Count" : {
"terms" : { "field" : "stock_status", "size" : 50}
},
"Category_Id_Count" : {
"terms" : { "field" : "category_id", "size" : 50}
}
}
}
And I am getting the count properly. How do i write these type of queries in php code?? As i am new to elasticsearch any help would be helpful Thanks in advance