# Benchmarking agg query

**URL:** <https://discuss.elastic.co/t/benchmarking-agg-query/125661>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [March 26, 2018, 6:36pm UTC](https://discuss.elastic.co/t/benchmarking-agg-query/125661 "2018-03-26T18:36:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![poorvig89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poorvig89/32/28505_2.png) [@poorvig89](https://discuss.elastic.co/u/poorvig89)\
**Post date:** [March 26, 2018, 6:36pm UTC](https://discuss.elastic.co/t/benchmarking-agg-query/125661/1 "2018-03-26T18:36:52Z")

</div>

Hello Daniel,  
While using Rally for benchmarking if I have function score or "aggs" in my query, my search error rate goes to 100%. I was wondering if we can use them while benchmarking or not .  
For eg.  
when I use below code , it works fine  
"query": {  
"bool": {  
...  
}  
}

but when I use this, I get error rate of 100% :  
{  
"query": {  
"function\_score": {  
"functions": [  
......  
],  
"query": {  
.....  
}  
},  
"score\_mode": "sum",  
"boost\_mode": "sum"  
}  
},  
"size": 300,  
"aggs": {  
"global\_buckets": {  
"global": {},  
"aggs": {  
.....  
}  
}  
},  
"\_source": [...]  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 26, 2018, 6:52pm UTC](https://discuss.elastic.co/t/benchmarking-agg-query/125661/2 "2018-03-26T18:52:37Z")

</div>

You can use aggregations. [Here](https://github.com/elastic/rally-tracks/blob/master/geopoint/operations/default.json#L77) is an example from the standard `geopoints` track. Try it out separately though to make sure the syntax is correct.

---

<div class="post-metadata">

**Author:** ![poorvig89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poorvig89/32/28505_2.png) [@poorvig89](https://discuss.elastic.co/u/poorvig89)\
**Post date:** [March 26, 2018, 8:21pm UTC](https://discuss.elastic.co/t/benchmarking-agg-query/125661/3 "2018-03-26T20:21:11Z")

</div>

Thank you so much Christian

---

<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:** [April 23, 2018, 8:21pm UTC](https://discuss.elastic.co/t/benchmarking-agg-query/125661/4 "2018-04-23T20:21:37Z")

</div>

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