# Does ignoreFilterIfFieldNotInIndex still work?

**URL:** https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544
**Category:** Kibana
**Created:** [December 19, 2018, 3:14pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544 "2018-12-19T15:14:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dimitriwalters](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitriwalters/32/35278_2.png) [@dimitriwalters](https://discuss.elastic.co/u/dimitriwalters)
#### Post date: [December 19, 2018, 3:14pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/1 "2018-12-19T15:14:13Z")

</div>

It currently doesn't work for me - situation being I have a dashboard with two indices and filtering by a field from one of them does not ignore the filter on visuals for the other index. I see this issue on GitHub,

> <https://github.com/elastic/kibana/issues/14081>

where the issue is that this setting doesn't work for "certain filters". However, I can't find a single filter where this setting works. Any official word on what the status on this setting is?

Thanks 🙂

Edit: I should add that I've tested this on 6.4.0 and 6.4.1

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [December 19, 2018, 10:21pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/2 "2018-12-19T22:21:02Z")

</div>

@Bargs can you please take a look?

Thanks,  
Bhavya

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [December 20, 2018, 11:19pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/3 "2018-12-20T23:19:42Z")

</div>

Silly question first: are you sure the field you're filtering on does not exist in both indices?

Second question: Can you give an example of a filter that you're having trouble with?

---

<div class="post-metadata">

### Author: ![dimitriwalters](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitriwalters/32/35278_2.png) [@dimitriwalters](https://discuss.elastic.co/u/dimitriwalters)
#### Post date: [January 2, 2019, 11:40pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/4 "2019-01-02T23:40:07Z")

</div>

Yup, in fact neither index contains any custom field with the same name.

I am filtering through the dashboard, selecting a field that is of datatype `keyword` and using the `is` operator and choosing one of the autocomplete values. Here is the query DSL of one of the filters I have tried:

```
{
  "query": {
    "match": {
      "category.keyword": {
        "query": "A",
        "type": "phrase"
      }
    }
  }
}
```

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [January 4, 2019, 6:29pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/5 "2019-01-04T18:29:23Z")

</div>

@dimitriwalters Hmm I can't reproduce the issue, the setting is working fine for me. Could you provide a small example with sample indices that I can follow step by step to try to reproduce what you're seeing?

---

<div class="post-metadata">

### Author: ![dimitriwalters](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitriwalters/32/35278_2.png) [@dimitriwalters](https://discuss.elastic.co/u/dimitriwalters)
#### Post date: [January 11, 2019, 3:21pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/6 "2019-01-11T15:21:11Z")

</div>

@Bargs Here's two sample indices with data that still doesn't work:

```
PUT my_index_1
{
  "settings": {
    "index": {
      "number_of_shards": "1",
      "number_of_replicas": "0"
    }
  }
}

PUT my_index_2
{
  "settings": {
    "index": {
      "number_of_shards": "1",
      "number_of_replicas": "0"
    }
  }
}

POST my_index_1/_doc
{
  "field1": "A"
}

POST my_index_1/_doc
{
  "field1": "B"
}

POST my_index_1/_doc
{
  "field1": "C"
}

POST my_index_2/_doc
{
  "field2": "A"
}

POST my_index_2/_doc
{
  "field2": "B"
}

POST my_index_2/_doc
{
  "field2": "C"
}

```

I created a dashboard with two data metric visuals for the count of documents, and when filtering in the top menu using a field in one index it still results in 0 documents for the other index.

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [January 15, 2019, 8:05pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/7 "2019-01-15T20:05:26Z")

</div>

Perfect, thank you @dimitriwalters. I see what my issue was now, I only tested saved searches and oddly enough the setting _is_ working for those, but not for visualizations. I've created a [github ticket](https://github.com/elastic/kibana/issues/28784). I'll try to make time to look into a fix soon.

---

<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 12, 2019, 8:05pm UTC](https://discuss.elastic.co/t/does-ignorefilteriffieldnotinindex-still-work/161544/8 "2019-02-12T20:05:37Z")

</div>

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