# Add 'exists' filter to rollup

**URL:** <https://discuss.elastic.co/t/add-exists-filter-to-rollup/195367>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 15, 2019, 3:59pm UTC](https://discuss.elastic.co/t/add-exists-filter-to-rollup/195367 "2019-08-15T15:59:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricJohnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericjohnson/32/53592_2.png) [@EricJohnson](https://discuss.elastic.co/u/EricJohnson)\
**Post date:** [August 15, 2019, 3:59pm UTC](https://discuss.elastic.co/t/add-exists-filter-to-rollup/195367/1 "2019-08-15T15:59:17Z")

</div>

Greetings,

I'm working with rollups of metricbeat data. In rollups we want to see only documents that contain a certain field such as _system.cpu.total.pct_. Can I add the filter directly to the rollup definition? I'd like to add a filter like this:

```
"filter":{
	"exists": {
		"field": "system.cpu.total.pct"
	}
}

```

However, this throws an error that says that filter is not a valid rollup field:

```
{
   "type": "x_content_parse_exception",
   "reason": "[37:5] [xpack/rollup/jobconfig] unknown field [filter], parser not found"
}

```

The reason we want to do this is that the rollup otherwise contains documents that have fields we don't care about. We also want them to have actual numerical values and not be "null."

Any suggestions will be appreciated! Thank you.

---

<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:** [September 12, 2019, 3:59pm UTC](https://discuss.elastic.co/t/add-exists-filter-to-rollup/195367/2 "2019-09-12T15:59:26Z")

</div>

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