# Allocation filtering seems to only take the into account the first filter. (DiscoveryNodeFilters.java)

**URL:** <https://discuss.elastic.co/t/allocation-filtering-seems-to-only-take-the-into-account-the-first-filter-discoverynodefilters-java/9062>\
**Category:** Elasticsearch\
**Created:** [September 19, 2012, 12:33pm UTC](https://discuss.elastic.co/t/allocation-filtering-seems-to-only-take-the-into-account-the-first-filter-discoverynodefilters-java/9062 "2012-09-19T12:33:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michel\_Conrad](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michel\_Conrad](https://discuss.elastic.co/u/Michel_Conrad)\
**Post date:** [September 19, 2012, 12:33pm UTC](https://discuss.elastic.co/t/allocation-filtering-seems-to-only-take-the-into-account-the-first-filter-discoverynodefilters-java/9062/1 "2012-09-19T12:33:44Z")

</div>

When using something like:

index.routing.allocation.include.group = test  
index.routing.allocation.include.group2 = test2

only one filter seems to get applied.

DiscoveryNodeFilters.java in the match function, we are iterating over the  
filters, but only  
the first filter gets applied, the loop over the filters seems to always  
return  
on the first iteration, ignoring the filters after the firstone.

Is this a bug, or am I missing the point. If a further recreation is  
needed, I can  
further look into the issue.

Michel

--

---

<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:** [July 6, 2017, 3:12am UTC](https://discuss.elastic.co/t/allocation-filtering-seems-to-only-take-the-into-account-the-first-filter-discoverynodefilters-java/9062/2 "2017-07-06T03:12:20Z")

</div>

Closed on July 6, 2017, 3:12am UTC


