# Dutch hunspell doesn't work in 1.7.1?

**URL:** <https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440>\
**Category:** Elasticsearch\
**Created:** [September 1, 2015, 2:08pm UTC](https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440 "2015-09-01T14:08:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaap\_Blom](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Jaap\_Blom](https://discuss.elastic.co/u/Jaap_Blom)\
**Post date:** [September 1, 2015, 2:08pm UTC](https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440/1 "2015-09-01T14:08:35Z")

</div>

When I follow the standard procedure of adding a hunspell dictionary for the one for Dutch, I get the following error whenever I start Elasticsearch (for e.g. the en\_US dictionary works fine...):

[2015-09-01 15:58:04,959][ERROR][indices.analysis] [Richard Rider] Could not load hunspell dictionary [nl\_NL]  
java.lang.IllegalArgumentException: expected only one flag, got: Kc  
at org.apache.lucene.analysis.hunspell.Dictionary$FlagParsingStrategy.parseFlag(Dictionary.java:1055)  
at org.apache.lucene.analysis.hunspell.Dictionary.readAffixFile(Dictionary.java:338)  
at org.apache.lucene.analysis.hunspell.Dictionary.(Dictionary.java:222)  
at org.elasticsearch.indices.analysis.HunspellService.loadDictionary(HunspellService.java:185)  
at org.elasticsearch.indices.analysis.HunspellService.access$000(HunspellService.java:66)  
at org.elasticsearch.indices.analysis.HunspellService$1.load(HunspellService.java:94)  
at org.elasticsearch.indices.analysis.HunspellService$1.load(HunspellService.java:89)  
at org.elasticsearch.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)  
at org.elasticsearch.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)  
at org.elasticsearch.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)  
at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2197)  
at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)  
at org.elasticsearch.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)  
at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)  
at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)  
at org.elasticsearch.indices.analysis.HunspellService.scanAndLoadDictionaries(HunspellService.java:130)  
at org.elasticsearch.indices.analysis.HunspellService.(HunspellService.java:100)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)  
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)  
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)  
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)  
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)  
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:837)  
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)  
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)  
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)  
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)  
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)  
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:830)  
at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)  
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)  
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)  
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)  
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)  
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)  
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:210)  
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)  
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)  
[2015-09-01 15:58:04,962][ERROR][indices.analysis] [Richard Rider] exception while loading dictionary nl\_NL

I hope this is the right forum to post this.

Regards,  
Jaap

---

<div class="post-metadata">

**Author:** ![rmuir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmuir/32/44949_2.png) [@rmuir](https://discuss.elastic.co/u/rmuir)\
**Post date:** [September 1, 2015, 3:05pm UTC](https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440/2 "2015-09-01T15:05:08Z")

</div>

Hi, I think you need to find a better/newer copy of the dutch dictionary. I know there was an option for leniency here before, but I removed it: because it made it impossible to improve the hunspell support in lucene when it just silently did the wrong thing.

There are some dictionaries out there with bugs like this, especially old ones, hell I even found one with an executable file embedded inside of it!

My advice is to find the most recent version of the dictionary, usually that works best.

---

<div class="post-metadata">

**Author:** ![Jaap\_Blom](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Jaap\_Blom](https://discuss.elastic.co/u/Jaap_Blom)\
**Post date:** [September 30, 2015, 5:23am UTC](https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440/3 "2015-09-30T05:23:22Z")

</div>

Hi rmuir,

thanks for the tip! I'll try that, but I think it is weird that in former version it did work without touching any leniency option. Anyway good you found out that these dictionaries can be buggy. When I find a good one for Dutch I'll post a link here.

J.

---

<div class="post-metadata">

**Author:** ![nolexa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nolexa/32/10767_2.png) [@nolexa](https://discuss.elastic.co/u/nolexa)\
**Post date:** [July 7, 2016, 1:51am UTC](https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440/4 "2016-07-07T01:51:34Z")

</div>

The problem with the Dutch dictionary is that the use of a two-character flag value:

```auto
KEEPCASE Kc

```

comes before the long flag is enabled in this line:

```auto
FLAG long

```

### Solution

Move the `FLAG long` line up in the `nl_NL.aff` file, so that it comes before the `KEEPCASE Kc` line. Then it works.

---

<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 5, 2017, 10:37pm UTC](https://discuss.elastic.co/t/dutch-hunspell-doesnt-work-in-1-7-1/28440/5 "2017-07-05T22:37:30Z")

</div>


