I'm trying to create an index with an analyzer as shown here (using Python wrapper): http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html#english-analyzer
It doesn't work as-is, raising the following exception:
[Lady Lark] [my-index] failed to create
org.elasticsearch.indices.IndexCreationException: [my-index] failed to create index
at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:300)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:343)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:309)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: keyword filter requires either `keywords` or `keywords_path` to be configured
Without "english_keywords" or with non-empty keywords it works.
The keywords are optional and if you don't have any keywords the whole filter should be left out. Its a documentation problem.
Hmm, wonder if we should change the docs, or make the keyword filter accept an empty array...
Is it really fixed? Copy-paste still won't work because an example contains empty "keywords", and the note is confusing: "Words can be excluded from stemming with the stem_exclusion parameter. This filter should be removed if there are no words to exclude." - what is stem_exclusion, and if the filter should be removed why is it present in example?
Yes, copy and paste won't work. I've looked at the settings parsing code and an empty array is returned as null, so we can't distinguish between an empty array and an unset parameter.
I'll work on explaining this more fully
Better?
This is happening to me from: https://www.elastic.co/guide/en/elasticsearch/guide/current/algorithmic-stemmers.html
Omitting the keywords definition did the job in my case.
Most helpful comment
Omitting the
keywordsdefinition did the job in my case.