ignoreFilterIfFieldNotInIndex does not work?

Hi there!

I enabled "ignoreFilterIfFieldNotInIndex" option in Kibana Advanced Settings, since I am using 2 data views and I would like to avoid filtering out documents if some field does not exist in the data view

However, it did not work while I successfully used it a few years ago

I found the similar issue on Github:

however, it was for the old Kibana version

Nevertheless, the issue can be reproduced on my current 8.15.0:

Steps to reproduce:

  1. Run the following in Dev Tools to setup some example indices:
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"
}
  1. Create a dashboard with two metric visualizations with a simple Count aggregation, one for each index.
  2. Add a filter on one of the fields, notice that both visualizations get filtered
  3. Enable the advanced setting
  4. Go back to dashboard and create a filter again. Notice both visualizations are still getting filtered.

Am I doing something wrong?

Thank you!

Thanks for your post @nnikushkin I can't replicate this problem, it works fine for me. Can you turn the Advanced Setting off and on again and reload the page afterwards to make sure the change is applied?

Thank you @Teresa_Alvarez!

Hmm, indeed, when I redeployed Elastic from the scratch it started working as expected

Thank you for taking a look at it!

Have a wonderful day!