# Is there any way that I can filter the incoming data based upon predefined elastic-search query?

**URL:** https://discuss.elastic.co/t/is-there-any-way-that-i-can-filter-the-incoming-data-based-upon-predefined-elastic-search-query/214017
**Category:** Elasticsearch
**Created:** [January 7, 2020, 9:41am UTC](https://discuss.elastic.co/t/is-there-any-way-that-i-can-filter-the-incoming-data-based-upon-predefined-elastic-search-query/214017 "2020-01-07T09:41:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Vicky\_Shrestha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vicky_shrestha/32/60372_2.png) [@Vicky\_Shrestha](https://discuss.elastic.co/u/Vicky_Shrestha)
#### Post date: [January 7, 2020, 9:41am UTC](https://discuss.elastic.co/t/is-there-any-way-that-i-can-filter-the-incoming-data-based-upon-predefined-elastic-search-query/214017/1 "2020-01-07T09:41:37Z")

</div>

I have a condition where I don't need to insert certain normalized documents to Elasticsearch that matches the predefined sets of queries.  
Is there any way I can run the predefined Elasticsearch query against the document(JSON object)?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 7, 2020, 10:00am UTC](https://discuss.elastic.co/t/is-there-any-way-that-i-can-filter-the-incoming-data-based-upon-predefined-elastic-search-query/214017/2 "2020-01-07T10:00:11Z")

</div>

Welcome! I'd look at the percolator feature. See [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-percolate-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-percolate-query.html)

---

<div class="post-metadata">

### Author: ![Vicky\_Shrestha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vicky_shrestha/32/60372_2.png) [@Vicky\_Shrestha](https://discuss.elastic.co/u/Vicky_Shrestha)
#### Post date: [January 7, 2020, 10:41am UTC](https://discuss.elastic.co/t/is-there-any-way-that-i-can-filter-the-incoming-data-based-upon-predefined-elastic-search-query/214017/3 "2020-01-07T10:41:42Z")

</div>

Thanks for the quick reply 👍

---

<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: [February 4, 2020, 10:41am UTC](https://discuss.elastic.co/t/is-there-any-way-that-i-can-filter-the-incoming-data-based-upon-predefined-elastic-search-query/214017/4 "2020-02-04T10:41:53Z")

</div>

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