# Please help in understanding this query?

**URL:** <https://discuss.elastic.co/t/please-help-in-understanding-this-query/178277>\
**Category:** Elasticsearch\
**Created:** [April 24, 2019, 2:46pm UTC](https://discuss.elastic.co/t/please-help-in-understanding-this-query/178277 "2019-04-24T14:46:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pathri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pathri/32/54484_2.png) [@pathri](https://discuss.elastic.co/u/pathri)\
**Post date:** [April 24, 2019, 2:46pm UTC](https://discuss.elastic.co/t/please-help-in-understanding-this-query/178277/1 "2019-04-24T14:46:33Z")

</div>

query from kibana\_Sample\_data\_ecommerce index

anyone having bit of the spare time then please help in understanding below query, i just want to see the product.price aggregated on day\_of\_week basis then why customer\_date\_of\_birth and all is coming??

{  
"aggs": {  
"2": {  
"terms": {  
"field": "day\_of\_week",  
"size": 7,  
"order": {  
"\_count": "desc"  
}  
}  
}  
},  
"size": 0,  
"\_source": {  
"excludes":   
},  
"stored\_fields": [  
"\*"  
],  
"script\_fields": {},  
"docvalue\_fields": [  
{  
"field": "customer\_birth\_date",  
"format": "date\_time"  
},  
{  
"field": "order\_date",  
"format": "date\_time"  
},  
{  
"field": "products.created\_on",  
"format": "date\_time"  
}  
],  
"query": {  
"bool": {  
"must": [  
{  
"match\_all": {}  
},  
{  
"match\_all": {}  
},  
{  
"range": {  
"order\_date": {  
"gte": 1545242213947,  
"lte": 1547435920614,  
"format": "epoch\_millis"  
}  
}  
}  
],  
"filter": ,  
"should": ,  
"must\_not":   
}  
}  
}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 22, 2019, 2:46pm UTC](https://discuss.elastic.co/t/please-help-in-understanding-this-query/178277/2 "2019-05-22T14:46:35Z")

</div>

Closed on May 22, 2019, 2:46pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
