# Query\_string - fuzzy - stemmer

**URL:** https://discuss.elastic.co/t/query-string-fuzzy-stemmer/136804
**Category:** Elasticsearch
**Created:** [June 21, 2018, 8:51am UTC](https://discuss.elastic.co/t/query-string-fuzzy-stemmer/136804 "2018-06-21T08:51:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ben\_G](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@Ben\_G](https://discuss.elastic.co/u/Ben_G)
#### Post date: [June 21, 2018, 8:51am UTC](https://discuss.elastic.co/t/query-string-fuzzy-stemmer/136804/1 "2018-06-21T08:51:37Z")

</div>

I have the english stemmer on an analyzer which is used on a field. when I search exact it works fine. when I add ~ it doesnt match anything. ie:

This works

```
{
  "size": 20,
  "query": {
    "query_string": {
      "query": "googles",
      "default_field": "search",
      "default_operator": "and",
      "fuzziness": 1,
      "fuzzy_prefix_length": 1
    }
  }
}

```

this does not work

```
{
  "size": 20,
  "query": {
    "query_string": {
      "query": "googles~",
      "default_field": "search",
      "default_operator": "and",
      "fuzziness": 1,
      "fuzzy_prefix_length": 1
    }
  }
}

```

I've tested the analyzer and I can see its dropping the 'es' from the end to 'googl' on index from stemming.

I'm guessing on search the stemming is not being applied to the term as 'googles~' is further than 1 fuzziness from the indexed 'googl'. 'google~' matches.

I've read [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/query-dsl-query-string-query.html#_wildcards) that stemming is excluded on wildcards but it doesnt say anything on fuzziness.

Is this expected behavior? if so what would be the alternative? the reason I use query\_string is so I can control which words can be fuzzy matched. I've tested the 'match' query with fuzziness and that works as expected.

Thanks  
Ben

---

<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 19, 2018, 8:51am UTC](https://discuss.elastic.co/t/query-string-fuzzy-stemmer/136804/2 "2018-07-19T08:51:41Z")

</div>

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