# Hyphenation token filter seems to ignore minimum subword size

**URL:** https://discuss.elastic.co/t/hyphenation-token-filter-seems-to-ignore-minimum-subword-size/291295
**Category:** Elasticsearch
**Created:** [December 9, 2021, 7:28am UTC](https://discuss.elastic.co/t/hyphenation-token-filter-seems-to-ignore-minimum-subword-size/291295 "2021-12-09T07:28:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mariskaas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mariskaas](https://discuss.elastic.co/u/mariskaas)
#### Post date: [December 9, 2021, 7:28am UTC](https://discuss.elastic.co/t/hyphenation-token-filter-seems-to-ignore-minimum-subword-size/291295/1 "2021-12-09T07:28:45Z")

</div>

Hello,  
I was looking to use the hyphenation decompounder filter. However during testing I found out it seems to be ignoring the minimum subword size option.  
Here is an example analyze I tried (normally I use a text file with a wordlist)

```auto
GET _analyze
{
  "tokenizer": "standard",
  "filter": [
    {
      "min_subword_size": 3,
      "max_subword_size": 22,
      "type": "hyphenation_decompounder",
      "hyphenation_patterns_path": "analysis/hyph/nl.xml",
      "word_list": [
        "nederland",
        "de",
        "woorden",
        "woord",
        "den"
      ]
    }
  ],
  "text": "nederlandsewoorden"
}

```

And the result:

```auto
{
  "tokens" : [
    {
      "token" : "nederlandsewoorden",
      "start_offset" : 0,
      "end_offset" : 18,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "nederland",
      "start_offset" : 0,
      "end_offset" : 18,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "de",
      "start_offset" : 0,
      "end_offset" : 18,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "den",
      "start_offset" : 0,
      "end_offset" : 18,
      "type" : "<ALPHANUM>",
      "position" : 0
    }
  ]
}

```

I set the minimum subword size to be 3, but it still finds "de". It dissapears when set to 4 but then it won't find "den" anymore either. Is this a bug, or am I not understanding something about this filter.

---

<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: [January 6, 2022, 7:29am UTC](https://discuss.elastic.co/t/hyphenation-token-filter-seems-to-ignore-minimum-subword-size/291295/2 "2022-01-06T07:29:22Z")

</div>

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