# Analyzer API does not work for Elasticsearch 1.7

**URL:** <https://discuss.elastic.co/t/analyzer-api-does-not-work-for-elasticsearch-1-7/81288>\
**Category:** Elasticsearch\
**Created:** [April 5, 2017, 9:58am UTC](https://discuss.elastic.co/t/analyzer-api-does-not-work-for-elasticsearch-1-7/81288 "2017-04-05T09:58:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karolinebryn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karolinebryn/32/17095_2.png) [@Karolinebryn](https://discuss.elastic.co/u/Karolinebryn)\
**Post date:** [April 5, 2017, 9:58am UTC](https://discuss.elastic.co/t/analyzer-api-does-not-work-for-elasticsearch-1-7/81288/1 "2017-04-05T09:58:20Z")

</div>

We are running Elasticsearch 1.7 (planning to upgrade very soon) and I am trying to use the Analyze API to understand what the different analyzers do, but the result presented from elasticsearch is not what I expect.

If I run the following query against our elasticsearch instance

```
POST _analyze
{
  "analyzer": "stop", 
  "text": "Extremely good food! We had the happiest waiter and the crowd's always flowing!"
}

```

I will get this result

```
{
   "tokens": [
  {
     "token": "analyzer",
     "start_offset": 6,
     "end_offset": 14,
     "type": "<ALPHANUM>",
     "position": 1
  },
  {
     "token": "stop",
     "start_offset": 18,
     "end_offset": 22,
     "type": "<ALPHANUM>",
     "position": 2
  },
  {
     "token": "text",
     "start_offset": 30,
     "end_offset": 34,
     "type": "<ALPHANUM>",
     "position": 3
  },
  {
     "token": "extremely",
     "start_offset": 38,
     "end_offset": 47,
     "type": "<ALPHANUM>",
     "position": 4
  },
  {
     "token": "good",
     "start_offset": 48,
     "end_offset": 52,
     "type": "<ALPHANUM>",
     "position": 5
  },
  {
     "token": "food",
     "start_offset": 53,
     "end_offset": 57,
     "type": "<ALPHANUM>",
     "position": 6
  },
  {
     "token": "we",
     "start_offset": 59,
     "end_offset": 61,
     "type": "<ALPHANUM>",
     "position": 7
  },
  {
     "token": "had",
     "start_offset": 62,
     "end_offset": 65,
     "type": "<ALPHANUM>",
     "position": 8
  },
  {
     "token": "the",
     "start_offset": 66,
     "end_offset": 69,
     "type": "<ALPHANUM>",
     "position": 9
  },
  {
     "token": "happiest",
     "start_offset": 70,
     "end_offset": 78,
     "type": "<ALPHANUM>",
     "position": 10
  },
  {
     "token": "waiter",
     "start_offset": 79,
     "end_offset": 85,
     "type": "<ALPHANUM>",
     "position": 11
  },
  {
     "token": "and",
     "start_offset": 86,
     "end_offset": 89,
     "type": "<ALPHANUM>",
     "position": 12
  },
  {
     "token": "the",
     "start_offset": 90,
     "end_offset": 93,
     "type": "<ALPHANUM>",
     "position": 13
  },
  {
     "token": "crowd's",
     "start_offset": 94,
     "end_offset": 101,
     "type": "<ALPHANUM>",
     "position": 14
  },
  {
     "token": "always",
     "start_offset": 102,
     "end_offset": 108,
     "type": "<ALPHANUM>",
     "position": 15
  },
  {
     "token": "flowing",
     "start_offset": 109,
     "end_offset": 116,
     "type": "<ALPHANUM>",
     "position": 16
  }
   ]
}

```

which does not make sense to me. I am using the stop analyzer, why is the words "and" and "the" in the result? I have tried to change the stop analyzer to both whitespace and standard, but I get the exact same result as above. There is no difference between them.  
However, if I run the exact same query against an instance of Elasticsearch 5.x the result does no longer contain "and" and "the" and it seems much more as expected.

Is this because we are using 1.7 or is it something in our setup of Elasticsearch that is causing this issue?

---

<div class="post-metadata">

**Author:** ![Karolinebryn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karolinebryn/32/17095_2.png) [@Karolinebryn](https://discuss.elastic.co/u/Karolinebryn)\
**Post date:** [April 5, 2017, 11:32am UTC](https://discuss.elastic.co/t/analyzer-api-does-not-work-for-elasticsearch-1-7/81288/2 "2017-04-05T11:32:52Z")

</div>

Seems like Elasticsearch 1.7 analyzer API does not support POST requests 👎

---

<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:** [April 5, 2017, 12:14pm UTC](https://discuss.elastic.co/t/analyzer-api-does-not-work-for-elasticsearch-1-7/81288/3 "2017-04-05T12:14:06Z")

</div>

body based parameters were added in 2.0.0

see [https://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-analyze.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-analyze.html)

---

<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:** [May 3, 2017, 12:14pm UTC](https://discuss.elastic.co/t/analyzer-api-does-not-work-for-elasticsearch-1-7/81288/4 "2017-05-03T12:14:09Z")

</div>

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