Nested Aggregations
Aggregations, ko, NEST, kiya, ja, sakta hai — jaise, "category" ke, PAR, terms, aggregation, ke, ANDAR, EK, "avg, price" metric, aggregation — RESULT, mein, HAR, category, ke, ANDAR, USKI, AVERAGE, price, milti, hai.
Aggregations, EK, "query" ke, saath, bhi, COMBINE, ho, sakti, HAIN — DEFAULT, mein, aggregation, sirf, US, QUERY, se, MATCH, karne, waale, documents, PAR, hi, CALCULATE, hoti hai.
GET /products/_search
{
"size": 0,
"aggs": {
"by_category": {
"terms": { "field": "category.keyword" },
"aggs": { "avg_price": { "avg": { "field": "price" } } }
}
}
}- Aggregations ko nest kiya ja sakta hai — bucket ke andar metric
- Query aur aggregations combine ho sakti hain
- post_filter se hits filter hote hain, aggregations affect nahi hote
Aggregations, ko, NEST, kiya, ja, sakta hai — jaise, "category" ke, PAR, terms, aggregation, ke, ANDAR, EK, "avg, price" metric, aggregation, — RESULT, mein, HAR, category, ke, ANDAR, USKI, AVERAGE, price, milti, hai.
GET /products/_search
{
"size": 0,
"aggs": {
"by_category": {
"terms": { "field": "category.keyword" },
"aggs": { "avg_price": { "avg": { "field": "price" } } }
}
}
}Aggregations, EK, "query" ke, saath, bhi, COMBINE, ho, sakti, HAIN — DEFAULT, mein, aggregation, sirf, US, QUERY, se, MATCH, karne, waale, documents, PAR, hi, CALCULATE, hoti hai, ("global" aggregation, EXCEPTION, hai, JO, QUERY, ko, IGNORE, karti hai).