# Keyword filter requires either \`keywords\` or \`keywords\_path\` to be configured

**URL:** <https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332>\
**Category:** Elasticsearch\
**Created:** [March 28, 2017, 5:04pm UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332 "2017-03-28T17:04:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpmika](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dpmika/32/16808_2.png) [@dpmika](https://discuss.elastic.co/u/dpmika)\
**Post date:** [March 28, 2017, 5:04pm UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/1 "2017-03-28T17:04:18Z")

</div>

Hello to all,  
I just implemented elastics on my ecommerce and after creating all the documents, I sent through the settings that I found to this page of the documentation.  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html#italian-analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html#italian-analyzer)

when once closed and send the new settings, I go to open when index I from this error.

```
{
   "error": {
  "root_cause": [
     {
        "type": "illegal_argument_exception",
        "reason": "keyword filter requires either `keywords` or `keywords_path` to be configured"
     }
  ],
  "type": "illegal_argument_exception",
  "reason": "keyword filter requires either `keywords` or `keywords_path` to be configured"
   },
   "status": 400
}

```

I try to re-send the new setting by removing the filter of keywords, but nothing index does not want to leave.

Someone can help me figure out how I can fix this problem? I would not lose any documents that I addressed ..

Thanks anticipamente.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [March 29, 2017, 8:08am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/2 "2017-03-29T08:08:53Z")

</div>

> [@dpmika](#):
>
> I try to re-send the new setting by removing the filter of keywords, but nothing index does not want to leave.

Maybe try to put an empty string into your list of keywords?

---

<div class="post-metadata">

**Author:** ![dpmika](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dpmika/32/16808_2.png) [@dpmika](https://discuss.elastic.co/u/dpmika)\
**Post date:** [March 29, 2017, 8:41am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/3 "2017-03-29T08:41:04Z")

</div>

I try put this

```
PUT /myindex/_settings
{
  "settings": {
    "analysis": {
      "filter": {
        "italian_elision": {
          "type": "elision",
          "articles": [
                "c", "l", "all", "dall", "dell",
                "nell", "sull", "coll", "pell",
                "gl", "agl", "dagl", "degl", "negl",
                "sugl", "un", "m", "t", "s", "v", "d"
          ]
        },
        "italian_stop": {
          "type": "stop",
          "stopwords": "_italian_" 
        },
        "italian_stemmer": {
          "type": "stemmer",
          "language": "light_italian"
        },
        "italian_keywords": {
                 "type": "keyword_marker",
                 "keywords_path" : ["text","test"]
                }
      },
      "analyzer": {
        "italian": {
          "tokenizer": "standard",
          "filter": [
            "italian_elision",
            "lowercase",
            "italian_stop",
            "italian_stemmer"
          ]
        }
      }
    }
  }
}

```

but elastic response with:

**keyword filter requires either `keywords` or `keywords_path` to be configured**

Why I can not change the settings?

---

<div class="post-metadata">

**Author:** ![dpmika](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dpmika/32/16808_2.png) [@dpmika](https://discuss.elastic.co/u/dpmika)\
**Post date:** [March 29, 2017, 8:48am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/4 "2017-03-29T08:48:38Z")

</div>

I send this for update settings after close index:

```
{
  "settings": {
    "analysis": {
      "filter": {
        "italian_elision": {
          "type": "elision",
          "articles": [
                "c", "l", "all", "dall", "dell",
                "nell", "sull", "coll", "pell",
                "gl", "agl", "dagl", "degl", "negl",
                "sugl", "un", "m", "t", "s", "v", "d"
          ]
        },
        "italian_stop": {
          "type": "stop",
          "stopwords": "_italian_" 
        },
        "italian_keywords": {
          "type": "keyword_marker",
          "keywords": ["test","test2"] 
        },
        "italian_stemmer": {
          "type": "stemmer",
          "language": "light_italian"
        }
      },
      "analyzer": {
        "italian": {
          "tokenizer": "standard",
          "filter": [
            "italian_elision",
            "lowercase",
            "italian_stop",
            "italian_keywords",
            "italian_stemmer"
          ]
        }
      }
    }
  }
}

```

And response this:

```
{
   "error": {
  "root_cause": [
     {
        "type": "illegal_argument_exception",
        "reason": "keyword filter requires either `keywords` or `keywords_path` to be configured"
     }
  ],
  "type": "illegal_argument_exception",
  "reason": "keyword filter requires either `keywords` or `keywords_path` to be configured"
   },
   "status": 400
}
```

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [March 29, 2017, 8:51am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/5 "2017-03-29T08:51:32Z")

</div>

Can you share the output of `GET myindex/_settings`?

---

<div class="post-metadata">

**Author:** ![dpmika](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dpmika/32/16808_2.png) [@dpmika](https://discuss.elastic.co/u/dpmika)\
**Post date:** [March 29, 2017, 8:52am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/6 "2017-03-29T08:52:16Z")

</div>

> [@jpountz](#):
>
> GET myindex/\_settings?

```
{
   "fm": {
      "settings": {
         "index": {
            "number_of_shards": "5",
            "provided_name": "fm",
            "creation_date": "1490196785927",
            "analysis": {
               "filter": {
                  "italian_elision": {
                     "type": "elision",
                     "articles": [
                        "c",
                        "l",
                        "all",
                        "dall",
                        "dell",
                        "nell",
                        "sull",
                        "coll",
                        "pell",
                        "gl",
                        "agl",
                        "dagl",
                        "degl",
                        "negl",
                        "sugl",
                        "un",
                        "m",
                        "t",
                        "s",
                        "v",
                        "d"
                     ]
                  },
                  "italian_stemmer": {
                     "type": "stemmer",
                     "language": "light_italian"
                  },
                  "italian_keywords": {
                     "type": "keyword_marker"
                  },
                  "italian_stop": {
                     "type": "stop",
                     "stopwords": "_italian_"
                  }
               },
               "analyzer": {
                  "italian": {
                     "filter": [
                        "italian_elision",
                        "lowercase",
                        "italian_stop",
                        "italian_keywords",
                        "italian_stemmer"
                     ],
                     "tokenizer": "standard"
                  }
               }
            },
            "number_of_replicas": "1",
            "uuid": "6IyROmH4QluP61Z908cB6A",
            "version": {
               "created": "5020299"
            }
         }
      }
   }
}

```

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [March 29, 2017, 9:42am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/7 "2017-03-29T09:42:04Z")

</div>

I can reproduce the issue but can't think of a way to get this index back to work. I opened an issue: [https://github.com/elastic/elasticsearch/issues/23787](https://github.com/elastic/elasticsearch/issues/23787).

---

<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 26, 2017, 9:42am UTC](https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/8 "2017-04-26T09:42:14Z")

</div>

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