# Stemmer filter ignored in Analyze API

**URL:** <https://discuss.elastic.co/t/stemmer-filter-ignored-in-analyze-api/137695>\
**Category:** Elasticsearch\
**Created:** [June 27, 2018, 8:47pm UTC](https://discuss.elastic.co/t/stemmer-filter-ignored-in-analyze-api/137695 "2018-06-27T20:47:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankkoornstra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankkoornstra/32/6780_2.png) [@frankkoornstra](https://discuss.elastic.co/u/frankkoornstra)\
**Post date:** [June 27, 2018, 8:47pm UTC](https://discuss.elastic.co/t/stemmer-filter-ignored-in-analyze-api/137695/1 "2018-06-27T20:47:24Z")

</div>

I'm trying to see what stemming does specifically for different types of stemmers but when I do the following:

```auto
curl -X POST \
  http://i:9200/_analyze \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
	"text": "consigned",
	"filter": [
		"lowercase",
		{
			"type": "stemmer",
			"language": "porter2"
		}
		]
}'

```

The results are

```auto
    "tokens": [
        {
            "token": "consigned",
            "start_offset": 0,
            "end_offset": 9,
            "type": "<ALPHANUM>",
            "position": 0
        }
    ]
}

```

Whereas in [the documentation of the Porter2 stemmer](http://snowball.tartarus.org/algorithms/english/stemmer.html), it states that it should be stemmed to `consign`. What am I doing wrong?

The lowercase _is_ working btw (if I use uppercase in the text)

---

<div class="post-metadata">

**Author:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [June 28, 2018, 10:59am UTC](https://discuss.elastic.co/t/stemmer-filter-ignored-in-analyze-api/137695/2 "2018-06-28T10:59:31Z")

</div>

Hi @frankkoornstra,

I think you use version 5.x.  
[In 5.x doc](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/indices-analyze.html),

```auto
tokenizer is mandatory when using char_filter or filter. If it is not set, the filters are ignored and the default analyzer is used.

```

It means you should add `tokenizer` parameter. If you are thinking to test `normalizer`, you should add `tokenizer="keyword"`.

The `_analyze` API can show what analyzer/tokenizer works in response if the request has [`explain=true`](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/_explain_analyze.html) parameter.

---

<div class="post-metadata">

**Author:** ![frankkoornstra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankkoornstra/32/6780_2.png) [@frankkoornstra](https://discuss.elastic.co/u/frankkoornstra)\
**Post date:** [June 28, 2018, 11:02am UTC](https://discuss.elastic.co/t/stemmer-filter-ignored-in-analyze-api/137695/3 "2018-06-28T11:02:12Z")

</div>

Jep, that's right! Thanks, completely overlooked the need to add a tokenizer, explains a lot.

---

<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 26, 2018, 11:02am UTC](https://discuss.elastic.co/t/stemmer-filter-ignored-in-analyze-api/137695/4 "2018-07-26T11:02:28Z")

</div>

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