I have the following index in elasticsearch 2.3.4.
What will be the query that return me the Desired Output given below from the given collection.
Collection:
[
{
"product_id": 1,
"product_title": "product title 1",
"product_status": "launched"
},
{
"product_id": 2,
"product_title": "product title 2",
"product_status": "launched"
},
{
"product_id": 7,
"product_title": "product title 7",
"product_status": "upcoming"
},
{
"product_id": 8,
"product_title": "product title 8",
"product_status": "upcoming"
},
{
"product_id": 3,
"product_title": "product title 3",
"product_status": "discontinued"
},
{
"product_id": 4,
"product_title": "product title 4",
"product_status": "discontinued"
},
{
"product_id": 5,
"product_title": "product title 5",
"product_status": "comingsoon"
},
{
"product_id": 6,
"product_title": "product title 6",
"product_status": "comingsoon"
}
]
Desired Output:
[
{
"product_id": 1,
"product_title": "product title 1",
"product_status": "launched"
},
{
"product_id": 2,
"product_title": "product title 2",
"product_status": "launched"
},
{
"product_id": 3,
"product_title": "product title 3",
"product_status": "discontinued"
},
{
"product_id": 4,
"product_title": "product title 4",
"product_status": "discontinued"
},
{
"product_id": 5,
"product_title": "product title 5",
"product_status": "comingsoon"
},
{
"product_id": 6,
"product_title": "product title 6",
"product_status": "comingsoon"
},
{
"product_id": 7,
"product_title": "product title 7",
"product_status": "upcoming"
},
{
"product_id": 8,
"product_title": "product title 8",
"product_status": "upcoming"
},
]