# Compare accuracy between rollup and normal indices

**URL:** <https://discuss.elastic.co/t/compare-accuracy-between-rollup-and-normal-indices/168200>\
**Category:** Elasticsearch\
**Created:** [February 13, 2019, 11:37am UTC](https://discuss.elastic.co/t/compare-accuracy-between-rollup-and-normal-indices/168200 "2019-02-13T11:37:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmallios](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cmallios](https://discuss.elastic.co/u/cmallios)\
**Post date:** [February 13, 2019, 11:37am UTC](https://discuss.elastic.co/t/compare-accuracy-between-rollup-and-normal-indices/168200/1 "2019-02-13T11:37:17Z")

</div>

I am trying to run some reports to compare rollup vs normal indices, but I am getting different results.

At first I am using the version 6.5 and my config is:  
delay: 1d  
rollupindex: test-index  
index pattern: $productName-$dataset-201806  
datehistogram:{field:timestamp, Interval: 24h, timezone: utc}  
terms:[response.raw, itemTitle.raw, groupTitle.raw, seriesTitle.raw]

and my rollup query is:  
GET test-index/\_rollup\_search  
{  
"size": 0,  
"aggregations": {  
"seriesTitle": {  
"terms": {  
"field": "seriesTitle.raw",  
"size": 3,  
"collect\_mode": "breadth\_first",  
"order": {  
"\_count": "desc"  
}  
},  
"aggregations": {  
"groupTitle": {  
"terms": {  
"field": "groupTitle.raw",  
"size": 3,  
"order": {  
"\_count": "desc"  
},  
"collect\_mode": "breadth\_first"  
},  
"aggregations": {  
"itemTitle": {  
"terms": {  
"field": "itemTitle.raw",  
"missing": "[No item title]",  
"size": 3,  
"collect\_mode": "breadth\_first",  
"order": {  
"\_count": "desc"  
}  
}  
}  
}  
}  
}  
}  
}  
}

If apply the same exact query against the normal index using the \_search endpoint, I am getting a different result(the noisy is extremely noticeable)

Regarding the rollup, I thought that we could use any SUBSET of the terms fields set, in any order and at the same time I have seen no restriction until now that we should MANDATORY use it (either in the first level or in any other).  
Have I undeRstood something wrong?

---

<div class="post-metadata">

**Author:** ![cmallios](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cmallios](https://discuss.elastic.co/u/cmallios)\
**Post date:** [February 14, 2019, 5:05pm UTC](https://discuss.elastic.co/t/compare-accuracy-between-rollup-and-normal-indices/168200/2 "2019-02-14T17:05:52Z")

</div>

Below is a subpart of a response query via the rollup endpoint, where I have just replaced the keys with a random value. The sum between the childs' doc\_count and the sum\_other\_doc\_count is by far not consistent with parent's doc\_count and at the same time the parent's doc\_count is consistent with the expected count.

{  
"key\_as\_string": "2018-06-01T00:00:00.000Z",  
"key": 1527811200000,  
"doc\_count": 1786083,  
"seriesDoi": {  
"doc\_count\_error\_upper\_bound": 0,  
"sum\_other\_doc\_count": 554401,  
"buckets": [  
{  
"key": "key1",  
"doc\_count": 5  
},  
{  
"key": "key2",  
"doc\_count": 5  
},  
{  
"key": "key3",  
"doc\_count": 4  
},  
{  
"key": "key4",  
"doc\_count": 2  
},  
{  
"key": "key5",  
"doc\_count": 2  
},  
{  
"key": "key6",  
"doc\_count": 2  
},  
{  
"key": "key7",  
"doc\_count": 2  
},  
{  
"key": "key8",  
"doc\_count": 2  
},  
{  
"key": "key9",  
"doc\_count": 1  
},  
{  
"key": "key10",  
"doc\_count": 1  
}  
]  
}  
}

---

<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:** [March 14, 2019, 5:05pm UTC](https://discuss.elastic.co/t/compare-accuracy-between-rollup-and-normal-indices/168200/3 "2019-03-14T17:05:59Z")

</div>

Closed on March 14, 2019, 5:05pm UTC

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