# Suggestion problem after upgrading to elasticsearch 1.0.0

**URL:** <https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829>\
**Category:** Elasticsearch\
**Created:** [February 16, 2014, 1:27pm UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829 "2014-02-16T13:27:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhihai](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@Zhihai](https://discuss.elastic.co/u/Zhihai)\
**Post date:** [February 16, 2014, 1:27pm UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/1 "2014-02-16T13:27:39Z")

</div>

Hi

After upgrading to elasticsearch 1.0.0, I got a suggestion search error:

RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
nested: IllegalStateException[TokenStream contract violation: close() call  
missing]; }]

I found that the problem come with the suggestion query:

"suggest" : {  
"text" : "Xor the Got-Jewel",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "body",  
"field" : "bigram",  
"size" : 4,  
"real\_word\_error\_likelihood" : 0.95,  
"confidence" : 2.0,  
"gram\_size" : 2,  
"direct\_generator" : [ {  
"field" : "body",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1  
}, {  
"field" : "reverse",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1,  
"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
} ]  
}  
}  
}

If I remove the last two lines for pre\_filter and post\_filter, the search  
will be fine, but the suggestion result will not be expected.

"pre\_filter" : "reverse",  
"post\_filter" : "reverse"

Is there any solution on the above issue?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 16, 2014, 1:40pm UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/2 "2014-02-16T13:40:06Z")

</div>

I have seen that in past but with analysis plugins.  
Any chance you are using a plugin and did not update it ?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 16 févr. 2014 à 14:27, Zhihai Xian [donmisme@gmail.com](mailto:donmisme@gmail.com) a écrit :

Hi

After upgrading to elasticsearch 1.0.0, I got a suggestion search error:

RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]]; nested: IllegalStateException[TokenStream contract violation: close() call missing]; }]

I found that the problem come with the suggestion query:

"suggest" : {  
"text" : "Xor the Got-Jewel",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "body",  
"field" : "bigram",  
"size" : 4,  
"real\_word\_error\_likelihood" : 0.95,  
"confidence" : 2.0,  
"gram\_size" : 2,  
"direct\_generator" : [ {  
"field" : "body",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1  
}, {  
"field" : "reverse",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1,  
"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
} ]  
}  
}  
}  
If I remove the last two lines for pre\_filter and post\_filter, the search will be fine, but the suggestion result will not be expected.

"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
Is there any solution on the above issue?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/FEC3FEBF-B8E5-43A5-8654-393B200A3785%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/FEC3FEBF-B8E5-43A5-8654-393B200A3785%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [February 16, 2014, 3:52pm UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/3 "2014-02-16T15:52:01Z")

</div>

What is the definition of analyzer "body" ?

Jörg

On Sun, Feb 16, 2014 at 2:27 PM, Zhihai Xian [donmisme@gmail.com](mailto:donmisme@gmail.com) wrote:

> Hi
> 
> After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> 
> RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
> nested: IllegalStateException[TokenStream contract violation: close() call  
> missing]; }]
> 
> I found that the problem come with the suggestion query:
> 
> "suggest" : {  
> "text" : "Xor the Got-Jewel",  
> "simple\_phrase" : {  
> "phrase" : {  
> "analyzer" : "body",  
> "field" : "bigram",  
> "size" : 4,  
> "real\_word\_error\_likelihood" : 0.95,  
> "confidence" : 2.0,  
> "gram\_size" : 2,  
> "direct\_generator" : [ {  
> "field" : "body",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 1  
> }, {  
> "field" : "reverse",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 1,  
> "pre\_filter" : "reverse",  
> "post\_filter" : "reverse"  
> } ]  
> }  
> }  
> }
> 
> If I remove the last two lines for pre\_filter and post\_filter, the search  
> will be fine, but the suggestion result will not be expected.
> 
> "pre\_filter" : "reverse",  
> "post\_filter" : "reverse"
> 
> Is there any solution on the above issue?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFr7u-OAaGX7tQ7FGsVJq-iTrOUOQC7NOqW6WqfvS28NA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFr7u-OAaGX7tQ7FGsVJq-iTrOUOQC7NOqW6WqfvS28NA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Zhihai](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@Zhihai](https://discuss.elastic.co/u/Zhihai)\
**Post date:** [February 17, 2014, 1:17am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/4 "2014-02-17T01:17:52Z")

</div>

Hi,

The following is my actual suggestion search query :

"suggest" : {  
"text" : "ationel stadiem",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 2,  
"shard\_size" : 2,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter": "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}

Setting in Analyzer:

"suggestion\_analyzer": {  
"type" : "custom",  
"tokenizer": "standard",  
"filter":[  
"standard",  
"asciifolding",  
"word\_delimiter",  
"text\_shingle",  
"lowercase",  
"stop",  
"en\_GB"

```
    ]
  },

```

"reverse\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"reverse"  
]  
},

I did not use any plugins

Thanks

On Sunday, February 16, 2014 11:52:01 PM UTC+8, Jörg Prante wrote:

> What is the definition of analyzer "body" ?
> 
> Jörg
> 
> On Sun, Feb 16, 2014 at 2:27 PM, Zhihai Xian \<[donm...@gmail.com](mailto:donm...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi
> > 
> > After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> > 
> > RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
> > nested: IllegalStateException[TokenStream contract violation: close() call  
> > missing]; }]
> > 
> > I found that the problem come with the suggestion query:
> > 
> > "suggest" : {
> > 
> > ```
> > "text" : "Xor the Got-Jewel",
> > 
> > "simple_phrase" : {
> > 
> > "phrase" : {
> > 
> > "analyzer" : "body",
> > 
> > "field" : "bigram",
> > 
> > "size" : 4,
> > 
> > "real_word_error_likelihood" : 0.95,
> > 
> > "confidence" : 2.0,
> > 
> > "gram_size" : 2,
> > 
> > "direct_generator" : [ {
> > 
> > "field" : "body",
> > 
> > "suggest_mode" : "always",
> > 
> > "min_word_length" : 1
> > 
> > }, {
> > "field" : "reverse",
> > 
> > "suggest_mode" : "always",
> > 
> > "min_word_length" : 1,
> > 
> > "pre_filter" : "reverse",
> > 
> > "post_filter" : "reverse"
> > 
> > } ]
> > }
> > 
> > }
> > 
> > ```
> > 
> > }
> > 
> > If I remove the last two lines for pre\_filter and post\_filter, the search  
> > will be fine, but the suggestion result will not be expected.
> > 
> > "pre\_filter" : "reverse",
> > 
> > "post\_filter" : "reverse"
> > 
> > Is there any solution on the above issue?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f7918233-dbaf-4492-b66d-9124443c06ae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f7918233-dbaf-4492-b66d-9124443c06ae%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Zhihai](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@Zhihai](https://discuss.elastic.co/u/Zhihai)\
**Post date:** [February 17, 2014, 1:21am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/5 "2014-02-17T01:21:08Z")

</div>

Hi David,

I did not use any plugins

The following is my actual suggestion search query :

"suggest" : {  
"text" : "ationel stadiem",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 2,  
"shard\_size" : 2,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter": "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}

Setting in Analyzer:

"suggestion\_analyzer": {  
"type" : "custom",  
"tokenizer": "standard",  
"filter":[  
"standard",  
"asciifolding",  
"word\_delimiter",  
"text\_shingle",  
"lowercase",  
"stop",  
"en\_GB"

```
    ]
  },

```

"reverse\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"reverse"  
]  
},

Thanks

On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:

> I have seen that in past but with analysis plugins.  
> Any chance you are using a plugin and did not update it ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 16 févr. 2014 à 14:27, Zhihai Xian \<[donm...@gmail.com](mailto:donm...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi
> 
> After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> 
> RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
> nested: IllegalStateException[TokenStream contract violation: close() call  
> missing]; }]
> 
> I found that the problem come with the suggestion query:
> 
> "suggest" : {  
> "text" : "Xor the Got-Jewel",  
> "simple\_phrase" : {  
> "phrase" : {  
> "analyzer" : "body",  
> "field" : "bigram",  
> "size" : 4,  
> "real\_word\_error\_likelihood" : 0.95,  
> "confidence" : 2.0,  
> "gram\_size" : 2,  
> "direct\_generator" : [ {  
> "field" : "body",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 1  
> }, {  
> "field" : "reverse",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 1,  
> "pre\_filter" : "reverse",  
> "post\_filter" : "reverse"  
> } ]  
> }  
> }  
> }
> 
> If I remove the last two lines for pre\_filter and post\_filter, the search  
> will be fine, but the suggestion result will not be expected.
> 
> "pre\_filter" : "reverse",  
> "post\_filter" : "reverse"
> 
> Is there any solution on the above issue?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 17, 2014, 5:18am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/6 "2014-02-17T05:18:21Z")

</div>

Could you gist a full curl recreation to reproduce your issue?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 17 févr. 2014 à 02:21, Zhihai Xian [donmisme@gmail.com](mailto:donmisme@gmail.com) a écrit :

Hi David,

I did not use any plugins

The following is my actual suggestion search query :

"suggest" : {  
"text" : "ationel stadiem",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 2,  
"shard\_size" : 2,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter": "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}

Setting in Analyzer:

"suggestion\_analyzer": {  
"type" : "custom",  
"tokenizer": "standard",  
"filter":[  
"standard",  
"asciifolding",  
"word\_delimiter",  
"text\_shingle",  
"lowercase",  
"stop",  
"en\_GB"

```
    ]
  },

```

"reverse\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"reverse"  
]  
},

Thanks

> On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:  
> I have seen that in past but with analysis plugins.  
> Any chance you are using a plugin and did not update it ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 16 févr. 2014 à 14:27, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :
> 
> Hi
> 
> After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> 
> RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]]; nested: IllegalStateException[TokenStream contract violation: close() call missing]; }]
> 
> I found that the problem come with the suggestion query:
> 
> "suggest" : {  
> "text" : "Xor the Got-Jewel",  
> "simple\_phrase" : {  
> "phrase" : {  
> "analyzer" : "body",  
> "field" : "bigram",  
> "size" : 4,  
> "real\_word\_error\_likelihood" : 0.95,  
> "confidence" : 2.0,  
> "gram\_size" : 2,  
> "direct\_generator" : [ {  
> "field" : "body",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 1  
> }, {  
> "field" : "reverse",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 1,  
> "pre\_filter" : "reverse",  
> "post\_filter" : "reverse"  
> } ]  
> }  
> }  
> }  
> If I remove the last two lines for pre\_filter and post\_filter, the search will be fine, but the suggestion result will not be expected.
> 
> "pre\_filter" : "reverse",  
> "post\_filter" : "reverse"  
> Is there any solution on the above issue?
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/608ABF3F-6978-44E3-AC78-769D14DC7536%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/608ABF3F-6978-44E3-AC78-769D14DC7536%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Zhihai](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@Zhihai](https://discuss.elastic.co/u/Zhihai)\
**Post date:** [February 17, 2014, 7:03am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/7 "2014-02-17T07:03:28Z")

</div>

Hi David

I think I solve the problem by separating the full search query into match  
query (\_search) and suggest query (\_suggest),  
The search result and suggest result both looks fine so far.

my original full search string is shown below

[http://searchnode:9200/es\_search/article,fullpagepdf,graphics,photographics](http://searchnode:9200/es_search/article,fullpagepdf,graphics,photographics)  
POST \_search  
{  
"from" : 0,  
"size" : 10,  
"query" : {  
"filtered" : {  
"query" : {  
"multi\_match" : {  
"query" : "raise the capabilities of Singaporeans as well as to  
calibrate the existing work pass framework to ensure that foreign work",  
"fields" : [ "headline\_en^4", "headline\_cn^4", "byline\_en",  
"byline\_cn", "caption\_en^2", "caption\_cn^2", "body\_en^3", "body\_cn^3" ] ,  
"analyzer": "phrase\_analyzer"  
}  
},  
"filter" : {  
"and" : {  
"filters" : [ {  
"term" : {  
"wires" : "1"  
}  
}, {  
"term" : {  
"language" : "en"  
}  
}, {  
"or" : {  
"filters" : [ {  
"terms" : {  
"hideinasiaone" : ["no", "NO", "No"]  
}  
}, {  
"and" : {  
"filters" : [ {  
"term" : {  
"language" : "zh"  
}  
}, {  
"range" : {  
"publicationdate" : {  
"from" : null,  
"to" : "2008-12-31",  
"include\_lower" : true,  
"include\_upper" : true  
}  
}  
} ]  
}  
}, {  
"terms" : {  
"sourcetype" : [ "ad\_metadata", "fullpagepdf",  
"photographics"]  
}  
} ]  
}  
} ]  
}  
}  
}  
},  
"sort" : [ {  
"\_score" : {  
"order" : "desc"  
}  
} ],  
"facets" : {  
"Company" : {  
"terms" : {  
"field" : "facet\_company",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Section" : {  
"terms" : {  
"field" : "facet\_pagename",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Publication" : {  
"terms" : {  
"field" : "publication",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Advertiser" : {  
"terms" : {  
"field" : "facet\_advertiser",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
}  
},  
"highlight" : {  
"pre\_tags" : ["\<span class="highlighting\_text"\>"],  
"post\_tags" : [""],  
"fields" : {  
"headline\_en" : {  
"fragment\_size" : 200,  
"number\_of\_fragments" : 1  
},  
"body\_en" : {  
"fragment\_size" : 350,  
"number\_of\_fragments" : 1  
},  
"pdfbody\_en" : {  
"fragment\_size" : 350,  
"number\_of\_fragments" : 1  
}  
}  
},  
"suggest" : {  
"text" : "raise the capabilities of Singaporeans as well as to  
calibrate the existing work pass framework to ensure that foreign worker",  
"search\_suggest" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 3,  
"shard\_size" : 3,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter" : "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}  
}  
}

and now I moved the below phrase suggestion query out of the full query  
search and do a single phrase suggest search as below

[http://searchnode:9200/es\_search/](http://searchnode:9200/es_search/)  
POST \_suggest  
{

```
"text" : "raise the capabilities of Singaporeans as well as to 

```

calibrate the existing work pass framework to ensure that foreign worker",  
"search\_suggest" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 2,  
"shard\_size" : 2,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter": "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}  
}

But I am not sure if this is a correct approach for my issue.

Thanks

On Monday, February 17, 2014 1:18:21 PM UTC+8, David Pilato wrote:

> Could you gist a full curl recreation to reproduce your issue?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 17 févr. 2014 à 02:21, Zhihai Xian \<[donm...@gmail.com](mailto:donm...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi David,
> 
> I did not use any plugins
> 
> The following is my actual suggestion search query :
> 
> "suggest" : {  
> "text" : "ationel stadiem",  
> "simple\_phrase" : {  
> "phrase" : {  
> "analyzer" : "suggestion\_analyzer",  
> "field" : "suggest\_phrase\_en",  
> "size" : 2,  
> "shard\_size" : 2,  
> "real\_word\_error\_likelihood" : 0.05,  
> "confidence" : 0.1,  
> "max\_errors" : 0.9,  
> "gram\_size" : 5,  
> "direct\_generator" : [ {  
> "field" : "suggest\_phrase\_en",  
> "suggest\_mode" : "always",  
> "size" : 3,  
> "max\_edits" : 2,  
> "min\_word\_length" : 3  
> }, {  
> "field" : "reverse\_phrase",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 3,  
> "pre\_filter": "reverse\_analyzer",  
> "post\_filter" : "reverse\_analyzer"  
> } ]  
> }  
> }
> 
> Setting in Analyzer:
> 
> "suggestion\_analyzer": {  
> "type" : "custom",  
> "tokenizer": "standard",  
> "filter":[  
> "standard",  
> "asciifolding",  
> "word\_delimiter",  
> "text\_shingle",  
> "lowercase",  
> "stop",  
> "en\_GB"
> 
> ```
> ]
> },
> 
> ```
> 
> "reverse\_analyzer": {  
> "type": "custom",  
> "tokenizer": "standard",  
> "filter": [  
> "reverse"  
> ]  
> },
> 
> Thanks
> 
> On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:
> 
> > I have seen that in past but with analysis plugins.  
> > Any chance you are using a plugin and did not update it ?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 16 févr. 2014 à 14:27, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :
> > 
> > Hi
> > 
> > After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> > 
> > RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
> > nested: IllegalStateException[TokenStream contract violation: close() call  
> > missing]; }]
> > 
> > I found that the problem come with the suggestion query:
> > 
> > "suggest" : {  
> > "text" : "Xor the Got-Jewel",  
> > "simple\_phrase" : {  
> > "phrase" : {  
> > "analyzer" : "body",  
> > "field" : "bigram",  
> > "size" : 4,  
> > "real\_word\_error\_likelihood" : 0.95,  
> > "confidence" : 2.0,  
> > "gram\_size" : 2,  
> > "direct\_generator" : [ {  
> > "field" : "body",  
> > "suggest\_mode" : "always",  
> > "min\_word\_length" : 1  
> > }, {  
> > "field" : "reverse",  
> > "suggest\_mode" : "always",  
> > "min\_word\_length" : 1,  
> > "pre\_filter" : "reverse",  
> > "post\_filter" : "reverse"  
> > } ]  
> > }  
> > }  
> > }
> > 
> > If I remove the last two lines for pre\_filter and post\_filter, the search  
> > will be fine, but the suggestion result will not be expected.
> > 
> > "pre\_filter" : "reverse",  
> > "post\_filter" : "reverse"
> > 
> > Is there any solution on the above issue?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 17, 2014, 8:37am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/8 "2014-02-17T08:37:29Z")

</div>

It could be really interesting to have a full script on [gist.github.com](http://gist.github.com) which reproduce your initial error.  
I think we should not fail with an error such as: `TokenStream contract violation: close() call missing`.

So, if you can create that script, that would be awesome.

Thanks!

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 17 février 2014 à 08:03:32, Zhihai Xian ([donmisme@gmail.com](mailto:donmisme@gmail.com)) a écrit:

Hi David

I think I solve the problem by separating the full search query into match query (\_search) and suggest query (\_suggest),  
The search result and suggest result both looks fine so far.

my original full search string is shown below

[http://searchnode:9200/es\_search/article,fullpagepdf,graphics,photographics](http://searchnode:9200/es_search/article,fullpagepdf,graphics,photographics)  
POST \_search  
{  
"from" : 0,  
"size" : 10,  
"query" : {  
"filtered" : {  
"query" : {  
"multi\_match" : {  
"query" : "raise the capabilities of Singaporeans as well as to calibrate the existing work pass framework to ensure that foreign work",  
"fields" : ["headline\_en^4", "headline\_cn^4", "byline\_en", "byline\_cn", "caption\_en^2", "caption\_cn^2", "body\_en^3", "body\_cn^3"] ,  
"analyzer": "phrase\_analyzer"  
}  
},  
"filter" : {  
"and" : {  
"filters" : [ {  
"term" : {  
"wires" : "1"  
}  
}, {  
"term" : {  
"language" : "en"  
}  
}, {  
"or" : {  
"filters" : [ {  
"terms" : {  
"hideinasiaone" : ["no", "NO", "No"]  
}  
}, {  
"and" : {  
"filters" : [ {  
"term" : {  
"language" : "zh"  
}  
}, {  
"range" : {  
"publicationdate" : {  
"from" : null,  
"to" : "2008-12-31",  
"include\_lower" : true,  
"include\_upper" : true  
}  
}  
} ]  
}  
}, {  
"terms" : {  
"sourcetype" : ["ad\_metadata", "fullpagepdf", "photographics"]  
}  
} ]  
}  
} ]  
}  
}  
}  
},  
"sort" : [ {  
"\_score" : {  
"order" : "desc"  
}  
} ],  
"facets" : {  
"Company" : {  
"terms" : {  
"field" : "facet\_company",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Section" : {  
"terms" : {  
"field" : "facet\_pagename",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Publication" : {  
"terms" : {  
"field" : "publication",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Advertiser" : {  
"terms" : {  
"field" : "facet\_advertiser",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
}  
},  
"highlight" : {  
"pre\_tags" : ["\<span class="highlighting\_text"\>"],  
"post\_tags" : [""],  
"fields" : {  
"headline\_en" : {  
"fragment\_size" : 200,  
"number\_of\_fragments" : 1  
},  
"body\_en" : {  
"fragment\_size" : 350,  
"number\_of\_fragments" : 1  
},  
"pdfbody\_en" : {  
"fragment\_size" : 350,  
"number\_of\_fragments" : 1  
}  
}  
},  
"suggest" : {  
"text" : "raise the capabilities of Singaporeans as well as to calibrate the existing work pass framework to ensure that foreign worker",  
"search\_suggest" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 3,  
"shard\_size" : 3,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter" : "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}  
}  
}

and now I moved the below phrase suggestion query out of the full query search and do a single phrase suggest search as below

[http://searchnode:9200/es\_search/](http://searchnode:9200/es_search/)  
POST \_suggest  
{

```
"text" : "raise the capabilities of Singaporeans as well as to calibrate the existing work pass framework to ensure that foreign worker",
"search_suggest" : {      
  "phrase" : {
    "analyzer" : "suggestion_analyzer",
    "field" : "suggest_phrase_en",
    "size" : 2,
    "shard_size" : 2,
    "real_word_error_likelihood" : 0.05,
    "confidence" : 0.1,
    "max_errors" : 0.9,
    "gram_size" : 5,
    "direct_generator" : [ {
      "field" : "suggest_phrase_en",
      "suggest_mode" : "always",
      "size" : 3,
      "max_edits" : 2,
      "min_word_length" : 3
    }, {
      "field" : "reverse_phrase",
      "suggest_mode" : "always",
      "min_word_length" : 3,
      "pre_filter": "reverse_analyzer",
      "post_filter" : "reverse_analyzer"
    } ]
  }
}  

```

}

But I am not sure if this is a correct approach for my issue.

Thanks

On Monday, February 17, 2014 1:18:21 PM UTC+8, David Pilato wrote:  
Could you gist a full curl recreation to reproduce your issue?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 17 févr. 2014 à 02:21, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :

Hi David,

I did not use any plugins

The following is my actual suggestion search query :

"suggest" : {  
"text" : "ationel stadiem",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 2,  
"shard\_size" : 2,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter": "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}

Setting in Analyzer:

"suggestion\_analyzer": {  
"type" : "custom",  
"tokenizer": "standard",  
"filter":[  
"standard",  
"asciifolding",  
"word\_delimiter",  
"text\_shingle",  
"lowercase",  
"stop",  
"en\_GB"

```
    ]
  },

```

"reverse\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"reverse"  
]  
},

Thanks

On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:  
I have seen that in past but with analysis plugins.  
Any chance you are using a plugin and did not update it ?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 16 févr. 2014 à 14:27, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :

Hi

After upgrading to elasticsearch 1.0.0, I got a suggestion search error:

RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]]; nested: IllegalStateException[TokenStream contract violation: close() call missing]; }]

I found that the problem come with the suggestion query:

"suggest" : {  
"text" : "Xor the Got-Jewel",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "body",  
"field" : "bigram",  
"size" : 4,  
"real\_word\_error\_likelihood" : 0.95,  
"confidence" : 2.0,  
"gram\_size" : 2,  
"direct\_generator" : [ {  
"field" : "body",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1  
}, {  
"field" : "reverse",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1,  
"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
} ]  
}  
}  
}  
If I remove the last two lines for pre\_filter and post\_filter, the search will be fine, but the suggestion result will not be expected.

"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
Is there any solution on the above issue?

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Zhihai](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@Zhihai](https://discuss.elastic.co/u/Zhihai)\
**Post date:** [February 18, 2014, 7:12am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/9 "2014-02-18T07:12:50Z")

</div>

Hi David

As requested, I created a gist on [gist.github.com](http://gist.github.com)\* . This is my first time  
to create somthing on gist. I am not sure if it is correct format. The  
following is the url :\*

[https://gist.github.com/donmis/9065851](https://gist.github.com/donmis/9065851) [http://gist.github.com/](http://gist.github.com/)

Regards

On Mon, Feb 17, 2014 at 4:37 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> It could be really interesting to have a full script on [gist.github.com](http://gist.github.com) which  
> reproduce your initial error.  
> I think we should not fail with an error such as: `TokenStream contract violation: close() call missing`.
> 
> So, if you can create that script, that would be awesome.
> 
> Thanks!
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 17 février 2014 à 08:03:32, Zhihai Xian ([donmisme@gmail.com](mailto:donmisme@gmail.com)) a écrit:
> 
> Hi David
> 
> I think I solve the problem by separating the full search query into match  
> query (\_search) and suggest query (\_suggest),  
> The search result and suggest result both looks fine so far.
> 
> my original full search string is shown below
> 
> [http://searchnode:9200/es\_search/article,fullpagepdf,graphics,photographics](http://searchnode:9200/es_search/article,fullpagepdf,graphics,photographics)  
> POST \_search  
> {  
> "from" : 0,  
> "size" : 10,  
> "query" : {  
> "filtered" : {  
> "query" : {  
> "multi\_match" : {  
> "query" : "raise the capabilities of Singaporeans as well as to  
> calibrate the existing work pass framework to ensure that foreign work",  
> "fields" : [ "headline\_en^4", "headline\_cn^4", "byline\_en",  
> "byline\_cn", "caption\_en^2", "caption\_cn^2", "body\_en^3", "body\_cn^3" ] ,  
> "analyzer": "phrase\_analyzer"  
> }  
> },  
> "filter" : {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "wires" : "1"  
> }  
> }, {  
> "term" : {  
> "language" : "en"  
> }  
> }, {  
> "or" : {  
> "filters" : [ {  
> "terms" : {  
> "hideinasiaone" : ["no", "NO", "No"]  
> }  
> }, {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "language" : "zh"  
> }  
> }, {  
> "range" : {  
> "publicationdate" : {  
> "from" : null,  
> "to" : "2008-12-31",  
> "include\_lower" : true,  
> "include\_upper" : true  
> }  
> }  
> } ]  
> }  
> }, {  
> "terms" : {  
> "sourcetype" : [ "ad\_metadata", "fullpagepdf",  
> "photographics"]  
> }  
> } ]  
> }  
> } ]  
> }  
> }  
> }  
> },  
> "sort" : [ {  
> "\_score" : {  
> "order" : "desc"  
> }  
> } ],  
> "facets" : {  
> "Company" : {  
> "terms" : {  
> "field" : "facet\_company",  
> "size" : 20,  
> "exclude" : [""],  
> "order" : "count"  
> }  
> },  
> "Section" : {  
> "terms" : {  
> "field" : "facet\_pagename",  
> "size" : 20,  
> "exclude" : [""],  
> "order" : "count"  
> }  
> },  
> "Publication" : {  
> "terms" : {  
> "field" : "publication",  
> "size" : 20,  
> "exclude" : [""],  
> "order" : "count"  
> }  
> },  
> "Advertiser" : {  
> "terms" : {  
> "field" : "facet\_advertiser",  
> "size" : 20,  
> "exclude" : [""],  
> "order" : "count"  
> }  
> }  
> },  
> "highlight" : {  
> "pre\_tags" : ["\<span class="highlighting\_text"\>"],  
> "post\_tags" : [""],  
> "fields" : {  
> "headline\_en" : {  
> "fragment\_size" : 200,  
> "number\_of\_fragments" : 1  
> },  
> "body\_en" : {  
> "fragment\_size" : 350,  
> "number\_of\_fragments" : 1  
> },  
> "pdfbody\_en" : {  
> "fragment\_size" : 350,  
> "number\_of\_fragments" : 1  
> }  
> }  
> },  
> "suggest" : {  
> "text" : "raise the capabilities of Singaporeans as well as to  
> calibrate the existing work pass framework to ensure that foreign worker",  
> "search\_suggest" : {  
> "phrase" : {  
> "analyzer" : "suggestion\_analyzer",  
> "field" : "suggest\_phrase\_en",  
> "size" : 3,  
> "shard\_size" : 3,  
> "real\_word\_error\_likelihood" : 0.05,  
> "confidence" : 0.1,  
> "max\_errors" : 0.9,  
> "gram\_size" : 5,  
> "direct\_generator" : [ {  
> "field" : "suggest\_phrase\_en",  
> "suggest\_mode" : "always",  
> "size" : 3,  
> "max\_edits" : 2,  
> "min\_word\_length" : 3  
> }, {  
> "field" : "reverse\_phrase",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 3,  
> "pre\_filter" : "reverse\_analyzer",  
> "post\_filter" : "reverse\_analyzer"  
> } ]  
> }  
> }  
> }  
> }
> 
> and now I moved the below phrase suggestion query out of the full query  
> search and do a single phrase suggest search as below
> 
> [http://searchnode:9200/es\_search/](http://searchnode:9200/es_search/)  
> POST \_suggest  
> {
> 
> ```
> "text" : "raise the capabilities of Singaporeans as well as to
> 
> ```
> 
> calibrate the existing work pass framework to ensure that foreign worker",  
> "search\_suggest" : {  
> "phrase" : {  
> "analyzer" : "suggestion\_analyzer",  
> "field" : "suggest\_phrase\_en",  
> "size" : 2,  
> "shard\_size" : 2,  
> "real\_word\_error\_likelihood" : 0.05,  
> "confidence" : 0.1,  
> "max\_errors" : 0.9,  
> "gram\_size" : 5,  
> "direct\_generator" : [ {  
> "field" : "suggest\_phrase\_en",  
> "suggest\_mode" : "always",  
> "size" : 3,  
> "max\_edits" : 2,  
> "min\_word\_length" : 3  
> }, {  
> "field" : "reverse\_phrase",  
> "suggest\_mode" : "always",  
> "min\_word\_length" : 3,  
> "pre\_filter": "reverse\_analyzer",  
> "post\_filter" : "reverse\_analyzer"  
> } ]  
> }  
> }  
> }
> 
> But I am not sure if this is a correct approach for my issue.
> 
> Thanks
> 
> On Monday, February 17, 2014 1:18:21 PM UTC+8, David Pilato wrote:
> 
> > Could you gist a full curl recreation to reproduce your issue?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 17 févr. 2014 à 02:21, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :
> > 
> > Hi David,
> > 
> > I did not use any plugins
> > 
> > The following is my actual suggestion search query :
> > 
> > "suggest" : {  
> > "text" : "ationel stadiem",  
> > "simple\_phrase" : {  
> > "phrase" : {  
> > "analyzer" : "suggestion\_analyzer",  
> > "field" : "suggest\_phrase\_en",  
> > "size" : 2,  
> > "shard\_size" : 2,  
> > "real\_word\_error\_likelihood" : 0.05,  
> > "confidence" : 0.1,  
> > "max\_errors" : 0.9,  
> > "gram\_size" : 5,  
> > "direct\_generator" : [ {  
> > "field" : "suggest\_phrase\_en",  
> > "suggest\_mode" : "always",  
> > "size" : 3,  
> > "max\_edits" : 2,  
> > "min\_word\_length" : 3  
> > }, {  
> > "field" : "reverse\_phrase",  
> > "suggest\_mode" : "always",  
> > "min\_word\_length" : 3,  
> > "pre\_filter": "reverse\_analyzer",  
> > "post\_filter" : "reverse\_analyzer"  
> > } ]  
> > }  
> > }
> > 
> > Setting in Analyzer:
> > 
> > "suggestion\_analyzer": {  
> > "type" : "custom",  
> > "tokenizer": "standard",  
> > "filter":[  
> > "standard",  
> > "asciifolding",  
> > "word\_delimiter",  
> > "text\_shingle",  
> > "lowercase",  
> > "stop",  
> > "en\_GB"
> > 
> > ```
> > ]
> > },
> > 
> > ```
> > 
> > "reverse\_analyzer": {  
> > "type": "custom",  
> > "tokenizer": "standard",  
> > "filter": [  
> > "reverse"  
> > ]  
> > },
> > 
> > Thanks
> > 
> > On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:
> > 
> > > I have seen that in past but with analysis plugins.  
> > > Any chance you are using a plugin and did not update it ?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 16 févr. 2014 à 14:27, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :
> > > 
> > > Hi
> > > 
> > > After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> > > 
> > > RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
> > > nested: IllegalStateException[TokenStream contract violation: close()  
> > > call missing]; }]
> > > 
> > > I found that the problem come with the suggestion query:
> > > 
> > > "suggest" : {  
> > > "text" : "Xor the Got-Jewel",  
> > > "simple\_phrase" : {  
> > > "phrase" : {  
> > > "analyzer" : "body",  
> > > "field" : "bigram",  
> > > "size" : 4,  
> > > "real\_word\_error\_likelihood" : 0.95,  
> > > "confidence" : 2.0,  
> > > "gram\_size" : 2,  
> > > "direct\_generator" : [ {  
> > > "field" : "body",  
> > > "suggest\_mode" : "always",  
> > > "min\_word\_length" : 1  
> > > }, {  
> > > "field" : "reverse",  
> > > "suggest\_mode" : "always",  
> > > "min\_word\_length" : 1,  
> > > "pre\_filter" : "reverse",  
> > > "post\_filter" : "reverse"  
> > > } ]  
> > > }  
> > > }  
> > > }
> > > 
> > > If I remove the last two lines for pre\_filter and post\_filter, the  
> > > search will be fine, but the suggestion result will not be expected.
> > > 
> > > "pre\_filter" : "reverse",  
> > > "post\_filter" : "reverse"
> > > 
> > > Is there any solution on the above issue?
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%  
> > > [40googlegroups.com](http://40googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%  
> > [40googlegroups.com](http://40googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> 
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/UmLSl9\_cTU4/unsubscribe](https://groups.google.com/d/topic/elasticsearch/UmLSl9_cTU4/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGGrwQFXEb\_WJ7%3DvoQk7QqKvzjB4Lv5Q%3DqJ%2BbV-Zm2Q4E7R00Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGGrwQFXEb_WJ7%3DvoQk7QqKvzjB4Lv5Q%3DqJ%2BbV-Zm2Q4E7R00Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 19, 2014, 8:29am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/10 "2014-02-19T08:29:30Z")

</div>

Thanks Don for this.

A full curl recreation means that we can just download your script and replay it with a single command line.

Somehow, it's a shell script which looks like this: [https://gist.github.com/dadoonet/2965777#file-test-sh](https://gist.github.com/dadoonet/2965777#file-test-sh)

You need to delete old test index, create the tes index, add the mapping if any, put some documents, refresh the index and then run your queries.

Could you update your script so I can replay it?

Thanks for your help so far!

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 18 février 2014 à 08:12:53, Don ([donmisme@gmail.com](mailto:donmisme@gmail.com)) a écrit:

Hi David

As requested, I created a gist on [gist.github.com](http://gist.github.com) . This is my first time to create somthing on gist. I am not sure if it is correct format. The following is the url :

> <https://gist.github.com/donmis/9065851>

Regards

On Mon, Feb 17, 2014 at 4:37 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
It could be really interesting to have a full script on [gist.github.com](http://gist.github.com) which reproduce your initial error.  
I think we should not fail with an error such as: `TokenStream contract violation: close() call missing`.

So, if you can create that script, that would be awesome.

Thanks!

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 17 février 2014 à 08:03:32, Zhihai Xian ([donmisme@gmail.com](mailto:donmisme@gmail.com)) a écrit:

Hi David

I think I solve the problem by separating the full search query into match query (\_search) and suggest query (\_suggest),  
The search result and suggest result both looks fine so far.

my original full search string is shown below

[http://searchnode:9200/es\_search/article,fullpagepdf,graphics,photographics](http://searchnode:9200/es_search/article,fullpagepdf,graphics,photographics)  
POST \_search  
{  
"from" : 0,  
"size" : 10,  
"query" : {  
"filtered" : {  
"query" : {  
"multi\_match" : {  
"query" : "raise the capabilities of Singaporeans as well as to calibrate the existing work pass framework to ensure that foreign work",  
"fields" : ["headline\_en^4", "headline\_cn^4", "byline\_en", "byline\_cn", "caption\_en^2", "caption\_cn^2", "body\_en^3", "body\_cn^3"] ,  
"analyzer": "phrase\_analyzer"  
}  
},  
"filter" : {  
"and" : {  
"filters" : [ {  
"term" : {  
"wires" : "1"  
}  
}, {  
"term" : {  
"language" : "en"  
}  
}, {  
"or" : {  
"filters" : [ {  
"terms" : {  
"hideinasiaone" : ["no", "NO", "No"]  
}  
}, {  
"and" : {  
"filters" : [ {  
"term" : {  
"language" : "zh"  
}  
}, {  
"range" : {  
"publicationdate" : {  
"from" : null,  
"to" : "2008-12-31",  
"include\_lower" : true,  
"include\_upper" : true  
}  
}  
} ]  
}  
}, {  
"terms" : {  
"sourcetype" : ["ad\_metadata", "fullpagepdf", "photographics"]  
}  
} ]  
}  
} ]  
}  
}  
}  
},  
"sort" : [ {  
"\_score" : {  
"order" : "desc"  
}  
} ],  
"facets" : {  
"Company" : {  
"terms" : {  
"field" : "facet\_company",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Section" : {  
"terms" : {  
"field" : "facet\_pagename",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Publication" : {  
"terms" : {  
"field" : "publication",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
},  
"Advertiser" : {  
"terms" : {  
"field" : "facet\_advertiser",  
"size" : 20,  
"exclude" : [""],  
"order" : "count"  
}  
}  
},  
"highlight" : {  
"pre\_tags" : ["\<span class="highlighting\_text"\>"],  
"post\_tags" : [""],  
"fields" : {  
"headline\_en" : {  
"fragment\_size" : 200,  
"number\_of\_fragments" : 1  
},  
"body\_en" : {  
"fragment\_size" : 350,  
"number\_of\_fragments" : 1  
},  
"pdfbody\_en" : {  
"fragment\_size" : 350,  
"number\_of\_fragments" : 1  
}  
}  
},  
"suggest" : {  
"text" : "raise the capabilities of Singaporeans as well as to calibrate the existing work pass framework to ensure that foreign worker",  
"search\_suggest" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 3,  
"shard\_size" : 3,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter" : "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}  
}  
}

and now I moved the below phrase suggestion query out of the full query search and do a single phrase suggest search as below

[http://searchnode:9200/es\_search/](http://searchnode:9200/es_search/)  
POST \_suggest  
{

```
"text" : "raise the capabilities of Singaporeans as well as to calibrate the existing work pass framework to ensure that foreign worker",
"search_suggest" : {      
  "phrase" : {
    "analyzer" : "suggestion_analyzer",
    "field" : "suggest_phrase_en",
    "size" : 2,
    "shard_size" : 2,
    "real_word_error_likelihood" : 0.05,
    "confidence" : 0.1,
    "max_errors" : 0.9,
    "gram_size" : 5,
    "direct_generator" : [ {
      "field" : "suggest_phrase_en",
      "suggest_mode" : "always",
      "size" : 3,
      "max_edits" : 2,
      "min_word_length" : 3
    }, {
      "field" : "reverse_phrase",
      "suggest_mode" : "always",
      "min_word_length" : 3,
      "pre_filter": "reverse_analyzer",
      "post_filter" : "reverse_analyzer"
    } ]
  }
}  

```

}

But I am not sure if this is a correct approach for my issue.

Thanks

On Monday, February 17, 2014 1:18:21 PM UTC+8, David Pilato wrote:  
Could you gist a full curl recreation to reproduce your issue?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 17 févr. 2014 à 02:21, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :

Hi David,

I did not use any plugins

The following is my actual suggestion search query :

"suggest" : {  
"text" : "ationel stadiem",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "suggestion\_analyzer",  
"field" : "suggest\_phrase\_en",  
"size" : 2,  
"shard\_size" : 2,  
"real\_word\_error\_likelihood" : 0.05,  
"confidence" : 0.1,  
"max\_errors" : 0.9,  
"gram\_size" : 5,  
"direct\_generator" : [ {  
"field" : "suggest\_phrase\_en",  
"suggest\_mode" : "always",  
"size" : 3,  
"max\_edits" : 2,  
"min\_word\_length" : 3  
}, {  
"field" : "reverse\_phrase",  
"suggest\_mode" : "always",  
"min\_word\_length" : 3,  
"pre\_filter": "reverse\_analyzer",  
"post\_filter" : "reverse\_analyzer"  
} ]  
}  
}

Setting in Analyzer:

"suggestion\_analyzer": {  
"type" : "custom",  
"tokenizer": "standard",  
"filter":[  
"standard",  
"asciifolding",  
"word\_delimiter",  
"text\_shingle",  
"lowercase",  
"stop",  
"en\_GB"

```
    ]
  },

```

"reverse\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"reverse"  
]  
},

Thanks

On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:  
I have seen that in past but with analysis plugins.  
Any chance you are using a plugin and did not update it ?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 16 févr. 2014 à 14:27, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :

Hi

After upgrading to elasticsearch 1.0.0, I got a suggestion search error:

RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]]; nested: IllegalStateException[TokenStream contract violation: close() call missing]; }]

I found that the problem come with the suggestion query:

"suggest" : {  
"text" : "Xor the Got-Jewel",  
"simple\_phrase" : {  
"phrase" : {  
"analyzer" : "body",  
"field" : "bigram",  
"size" : 4,  
"real\_word\_error\_likelihood" : 0.95,  
"confidence" : 2.0,  
"gram\_size" : 2,  
"direct\_generator" : [ {  
"field" : "body",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1  
}, {  
"field" : "reverse",  
"suggest\_mode" : "always",  
"min\_word\_length" : 1,  
"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
} ]  
}  
}  
}

If I remove the last two lines for pre\_filter and post\_filter, the search will be fine, but the suggestion result will not be expected.

"pre\_filter" : "reverse",  
"post\_filter" : "reverse"  
Is there any solution on the above issue?

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).

## To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.  
To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/UmLSl9\_cTU4/unsubscribe](https://groups.google.com/d/topic/elasticsearch/UmLSl9_cTU4/unsubscribe).  
To unsubscribe from this group and all its topics, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGGrwQFXEb\_WJ7%3DvoQk7QqKvzjB4Lv5Q%3DqJ%2BbV-Zm2Q4E7R00Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGGrwQFXEb_WJ7%3DvoQk7QqKvzjB4Lv5Q%3DqJ%2BbV-Zm2Q4E7R00Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53046b6a.109cf92e.2753%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53046b6a.109cf92e.2753%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Zhihai](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@Zhihai](https://discuss.elastic.co/u/Zhihai)\
**Post date:** [February 20, 2014, 1:31pm UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/11 "2014-02-20T13:31:44Z")

</div>

Hi David

I am quite busy at work, I will try to reform a full script at weekend,

Regards

On Wed, Feb 19, 2014 at 4:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Thanks Don for this.
> 
> A full curl recreation means that we can just download your script and  
> replay it with a single command line.
> 
> Somehow, it's a shell script which looks like this:  
> [Test case for multifield fields · GitHub](https://gist.github.com/dadoonet/2965777#file-test-sh)
> 
> You need to delete old test index, create the tes index, add the mapping  
> if any, put some documents, refresh the index and then run your queries.
> 
> Could you update your script so I can replay it?
> 
> Thanks for your help so far!
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 18 février 2014 à 08:12:53, Don ([donmisme@gmail.com](mailto:donmisme@gmail.com)) a écrit:
> 
> Hi David
> 
> As requested, I created a gist on [gist.github.com](http://gist.github.com)\* . This is my first  
> time to create somthing on gist. I am not sure if it is correct format. The  
> following is the url :\*
> 
> [https://gist.github.com/donmis/9065851](https://gist.github.com/donmis/9065851) [http://gist.github.com/](http://gist.github.com/)
> 
> Regards
> 
> On Mon, Feb 17, 2014 at 4:37 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > It could be really interesting to have a full script on [gist.github.com](http://gist.github.com) which  
> > reproduce your initial error.  
> > I think we should not fail with an error such as: `TokenStream contract violation: close() call missing`.
> > 
> > So, if you can create that script, that would be awesome.
> > 
> > Thanks!
> > 
> > ```
> > --
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 17 février 2014 à 08:03:32, Zhihai Xian ([donmisme@gmail.com](mailto:donmisme@gmail.com)) a écrit:
> > 
> > Hi David
> > 
> > I think I solve the problem by separating the full search query into  
> > match query (\_search) and suggest query (\_suggest),  
> > The search result and suggest result both looks fine so far.
> > 
> > my original full search string is shown below
> > 
> > [http://searchnode:9200/es\_search/article,fullpagepdf,graphics,photographics](http://searchnode:9200/es_search/article,fullpagepdf,graphics,photographics)  
> > POST \_search  
> > {  
> > "from" : 0,  
> > "size" : 10,  
> > "query" : {  
> > "filtered" : {  
> > "query" : {  
> > "multi\_match" : {  
> > "query" : "raise the capabilities of Singaporeans as well as to  
> > calibrate the existing work pass framework to ensure that foreign work",  
> > "fields" : [ "headline\_en^4", "headline\_cn^4", "byline\_en",  
> > "byline\_cn", "caption\_en^2", "caption\_cn^2", "body\_en^3", "body\_cn^3" ] ,  
> > "analyzer": "phrase\_analyzer"  
> > }  
> > },  
> > "filter" : {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "wires" : "1"  
> > }  
> > }, {  
> > "term" : {  
> > "language" : "en"  
> > }  
> > }, {  
> > "or" : {  
> > "filters" : [ {  
> > "terms" : {  
> > "hideinasiaone" : ["no", "NO", "No"]  
> > }  
> > }, {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "language" : "zh"  
> > }  
> > }, {  
> > "range" : {  
> > "publicationdate" : {  
> > "from" : null,  
> > "to" : "2008-12-31",  
> > "include\_lower" : true,  
> > "include\_upper" : true  
> > }  
> > }  
> > } ]  
> > }  
> > }, {  
> > "terms" : {  
> > "sourcetype" : [ "ad\_metadata", "fullpagepdf",  
> > "photographics"]  
> > }  
> > } ]  
> > }  
> > } ]  
> > }  
> > }  
> > }  
> > },  
> > "sort" : [ {  
> > "\_score" : {  
> > "order" : "desc"  
> > }  
> > } ],  
> > "facets" : {  
> > "Company" : {  
> > "terms" : {  
> > "field" : "facet\_company",  
> > "size" : 20,  
> > "exclude" : [""],  
> > "order" : "count"  
> > }  
> > },  
> > "Section" : {  
> > "terms" : {  
> > "field" : "facet\_pagename",  
> > "size" : 20,  
> > "exclude" : [""],  
> > "order" : "count"  
> > }  
> > },  
> > "Publication" : {  
> > "terms" : {  
> > "field" : "publication",  
> > "size" : 20,  
> > "exclude" : [""],  
> > "order" : "count"  
> > }  
> > },  
> > "Advertiser" : {  
> > "terms" : {  
> > "field" : "facet\_advertiser",  
> > "size" : 20,  
> > "exclude" : [""],  
> > "order" : "count"  
> > }  
> > }  
> > },  
> > "highlight" : {  
> > "pre\_tags" : ["\<span class="highlighting\_text"\>"],  
> > "post\_tags" : [""],  
> > "fields" : {  
> > "headline\_en" : {  
> > "fragment\_size" : 200,  
> > "number\_of\_fragments" : 1  
> > },  
> > "body\_en" : {  
> > "fragment\_size" : 350,  
> > "number\_of\_fragments" : 1  
> > },  
> > "pdfbody\_en" : {  
> > "fragment\_size" : 350,  
> > "number\_of\_fragments" : 1  
> > }  
> > }  
> > },  
> > "suggest" : {  
> > "text" : "raise the capabilities of Singaporeans as well as to  
> > calibrate the existing work pass framework to ensure that foreign worker",  
> > "search\_suggest" : {  
> > "phrase" : {  
> > "analyzer" : "suggestion\_analyzer",  
> > "field" : "suggest\_phrase\_en",  
> > "size" : 3,  
> > "shard\_size" : 3,  
> > "real\_word\_error\_likelihood" : 0.05,  
> > "confidence" : 0.1,  
> > "max\_errors" : 0.9,  
> > "gram\_size" : 5,  
> > "direct\_generator" : [ {  
> > "field" : "suggest\_phrase\_en",  
> > "suggest\_mode" : "always",  
> > "size" : 3,  
> > "max\_edits" : 2,  
> > "min\_word\_length" : 3  
> > }, {  
> > "field" : "reverse\_phrase",  
> > "suggest\_mode" : "always",  
> > "min\_word\_length" : 3,  
> > "pre\_filter" : "reverse\_analyzer",  
> > "post\_filter" : "reverse\_analyzer"  
> > } ]  
> > }  
> > }  
> > }  
> > }
> > 
> > and now I moved the below phrase suggestion query out of the full query  
> > search and do a single phrase suggest search as below
> > 
> > [http://searchnode:9200/es\_search/](http://searchnode:9200/es_search/)  
> > POST \_suggest  
> > {
> > 
> > ```
> > "text" : "raise the capabilities of Singaporeans as well as to
> > 
> > ```
> > 
> > calibrate the existing work pass framework to ensure that foreign worker",  
> > "search\_suggest" : {  
> > "phrase" : {  
> > "analyzer" : "suggestion\_analyzer",  
> > "field" : "suggest\_phrase\_en",  
> > "size" : 2,  
> > "shard\_size" : 2,  
> > "real\_word\_error\_likelihood" : 0.05,  
> > "confidence" : 0.1,  
> > "max\_errors" : 0.9,  
> > "gram\_size" : 5,  
> > "direct\_generator" : [ {  
> > "field" : "suggest\_phrase\_en",  
> > "suggest\_mode" : "always",  
> > "size" : 3,  
> > "max\_edits" : 2,  
> > "min\_word\_length" : 3  
> > }, {  
> > "field" : "reverse\_phrase",  
> > "suggest\_mode" : "always",  
> > "min\_word\_length" : 3,  
> > "pre\_filter": "reverse\_analyzer",  
> > "post\_filter" : "reverse\_analyzer"  
> > } ]  
> > }  
> > }  
> > }
> > 
> > But I am not sure if this is a correct approach for my issue.
> > 
> > Thanks
> > 
> > On Monday, February 17, 2014 1:18:21 PM UTC+8, David Pilato wrote:
> > 
> > > Could you gist a full curl recreation to reproduce your issue?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 17 févr. 2014 à 02:21, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :
> > > 
> > > Hi David,
> > > 
> > > I did not use any plugins
> > > 
> > > The following is my actual suggestion search query :
> > > 
> > > "suggest" : {  
> > > "text" : "ationel stadiem",  
> > > "simple\_phrase" : {  
> > > "phrase" : {  
> > > "analyzer" : "suggestion\_analyzer",  
> > > "field" : "suggest\_phrase\_en",  
> > > "size" : 2,  
> > > "shard\_size" : 2,  
> > > "real\_word\_error\_likelihood" : 0.05,  
> > > "confidence" : 0.1,  
> > > "max\_errors" : 0.9,  
> > > "gram\_size" : 5,  
> > > "direct\_generator" : [ {  
> > > "field" : "suggest\_phrase\_en",  
> > > "suggest\_mode" : "always",  
> > > "size" : 3,  
> > > "max\_edits" : 2,  
> > > "min\_word\_length" : 3  
> > > }, {  
> > > "field" : "reverse\_phrase",  
> > > "suggest\_mode" : "always",  
> > > "min\_word\_length" : 3,  
> > > "pre\_filter": "reverse\_analyzer",  
> > > "post\_filter" : "reverse\_analyzer"  
> > > } ]  
> > > }  
> > > }
> > > 
> > > Setting in Analyzer:
> > > 
> > > "suggestion\_analyzer": {  
> > > "type" : "custom",  
> > > "tokenizer": "standard",  
> > > "filter":[  
> > > "standard",  
> > > "asciifolding",  
> > > "word\_delimiter",  
> > > "text\_shingle",  
> > > "lowercase",  
> > > "stop",  
> > > "en\_GB"
> > > 
> > > ```
> > > ]
> > > },
> > > 
> > > ```
> > > 
> > > "reverse\_analyzer": {  
> > > "type": "custom",  
> > > "tokenizer": "standard",  
> > > "filter": [  
> > > "reverse"  
> > > ]  
> > > },
> > > 
> > > Thanks
> > > 
> > > On Sunday, February 16, 2014 9:40:06 PM UTC+8, David Pilato wrote:
> > > 
> > > > I have seen that in past but with analysis plugins.  
> > > > Any chance you are using a plugin and did not update it ?
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > Le 16 févr. 2014 à 14:27, Zhihai Xian [donm...@gmail.com](mailto:donm...@gmail.com) a écrit :
> > > > 
> > > > Hi
> > > > 
> > > > After upgrading to elasticsearch 1.0.0, I got a suggestion search error:
> > > > 
> > > > RemoteTransportException[[data98][inet[/172.28.96.98:9300]][search/phase/query]];  
> > > > nested: IllegalStateException[TokenStream contract violation: close() call  
> > > > missing]; }]
> > > > 
> > > > I found that the problem come with the suggestion query:
> > > > 
> > > > "suggest" : {  
> > > > "text" : "Xor the Got-Jewel",  
> > > > "simple\_phrase" : {  
> > > > "phrase" : {  
> > > > "analyzer" : "body",  
> > > > "field" : "bigram",  
> > > > "size" : 4,  
> > > > "real\_word\_error\_likelihood" : 0.95,  
> > > > "confidence" : 2.0,  
> > > > "gram\_size" : 2,  
> > > > "direct\_generator" : [ {  
> > > > "field" : "body",  
> > > > "suggest\_mode" : "always",  
> > > > "min\_word\_length" : 1  
> > > > }, {  
> > > > "field" : "reverse",  
> > > > "suggest\_mode" : "always",  
> > > > "min\_word\_length" : 1,  
> > > > "pre\_filter" : "reverse",  
> > > > "post\_filter" : "reverse"  
> > > > } ]  
> > > > }  
> > > > }  
> > > > }
> > > > 
> > > > If I remove the last two lines for pre\_filter and post\_filter, the  
> > > > search will be fine, but the suggestion result will not be expected.
> > > > 
> > > > "pre\_filter" : "reverse",  
> > > > "post\_filter" : "reverse"
> > > > 
> > > > Is there any solution on the above issue?
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6ab296e-f49e-4fcc-a7bc-a1ca32f0988e%40googlegroups.com)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/52eec1ed-cf39-42b6-a308-084770d4823d%40googlegroups.com)  
> > > .  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send  
> > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f5d95a4b-e59a-48e1-b3e2-08028d6da802%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/UmLSl9\_cTU4/unsubscribe](https://groups.google.com/d/topic/elasticsearch/UmLSl9_cTU4/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5301ca4a.3006c83e.f2%40MacBook-Air-de-David.local).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAGGrwQFXEb\_WJ7%3DvoQk7QqKvzjB4Lv5Q%3DqJ%2BbV-Zm2Q4E7R00Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGGrwQFXEb_WJ7%3DvoQk7QqKvzjB4Lv5Q%3DqJ%2BbV-Zm2Q4E7R00Q%40mail.gmail.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/UmLSl9\_cTU4/unsubscribe](https://groups.google.com/d/topic/elasticsearch/UmLSl9_cTU4/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.53046b6a.109cf92e.2753%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53046b6a.109cf92e.2753%40MacBook-Air-de-David.local)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGGrwQF6eOncTEu%3Dn2UAi1r5-yzksCFdpbdWkkTdmwMi2JSXCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGGrwQF6eOncTEu%3Dn2UAi1r5-yzksCFdpbdWkkTdmwMi2JSXCQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:48am UTC](https://discuss.elastic.co/t/suggestion-problem-after-upgrading-to-elasticsearch-1-0-0/15829/12 "2017-07-06T01:48:42Z")

</div>


