# Why not use bloom filter in es for search?

**URL:** <https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686>\
**Category:** Elasticsearch\
**Created:** [March 25, 2019, 8:13am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686 "2019-03-25T08:13:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zcx](https://avatars.discourse-cdn.com/v4/letter/z/e68b1a/32.png) [@zcx](https://discuss.elastic.co/u/zcx)\
**Post date:** [March 25, 2019, 8:13am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/1 "2019-03-25T08:13:10Z")

</div>

as above. thanks

---

<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 25, 2019, 8:19am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/2 "2019-03-25T08:19:52Z")

</div>

What benefits were you hoping to get by using bloom filters?

---

<div class="post-metadata">

**Author:** ![zcx](https://avatars.discourse-cdn.com/v4/letter/z/e68b1a/32.png) [@zcx](https://discuss.elastic.co/u/zcx)\
**Post date:** [March 25, 2019, 8:24am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/3 "2019-03-25T08:24:35Z")

</div>

reduce space complexity

---

<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 25, 2019, 8:30am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/4 "2019-03-25T08:30:07Z")

</div>

Please provide some more details. What benefit would it bring over the current approach?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [March 25, 2019, 8:36am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/5 "2019-03-25T08:36:57Z")

</div>

I added a bloom filter into Lucene some years ago to try speed up primary key style look ups where there were many new keys being inserted. The benefits were negligible.

---

<div class="post-metadata">

**Author:** ![zcx](https://avatars.discourse-cdn.com/v4/letter/z/e68b1a/32.png) [@zcx](https://discuss.elastic.co/u/zcx)\
**Post date:** [March 25, 2019, 8:58am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/6 "2019-03-25T08:58:39Z")

</div>

for example,if a filter match 1,000,000,000 documents, and with the help of bloom filter,es can catch them in the memory to get them quickly in case the same filter was executed again

---

<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 22, 2019, 8:58am UTC](https://discuss.elastic.co/t/why-not-use-bloom-filter-in-es-for-search/173686/7 "2019-04-22T08:58:42Z")

</div>

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