# Performance of post\_filterr vs filter

**URL:** https://discuss.elastic.co/t/performance-of-post-filterr-vs-filter/127797
**Category:** Elasticsearch
**Created:** [April 12, 2018, 10:54am UTC](https://discuss.elastic.co/t/performance-of-post-filterr-vs-filter/127797 "2018-04-12T10:54:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tald](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@tald](https://discuss.elastic.co/u/tald)
#### Post date: [April 12, 2018, 10:54am UTC](https://discuss.elastic.co/t/performance-of-post-filterr-vs-filter/127797/1 "2018-04-12T10:54:50Z")

</div>

Hi,  
I'm writing a service that receive as a parameter an elastic query and need to add, automatically, without knowing the query, extra conditions. From what i sow, there are 2 options:

1. post\_filter - more simple, the query is a black box and i just add post\_filter to it
2. filter - more complex, i need to analyse the query and determine where to add the filter conditions

which solution has better performance?

thanks,  
tal

---

<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 10, 2018, 10:55am UTC](https://discuss.elastic.co/t/performance-of-post-filterr-vs-filter/127797/2 "2018-05-10T10:55:04Z")

</div>

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