# Bug of Term Suggester

**URL:** <https://discuss.elastic.co/t/bug-of-term-suggester/17273>\
**Category:** Elasticsearch\
**Created:** [April 30, 2014, 1:41am UTC](https://discuss.elastic.co/t/bug-of-term-suggester/17273 "2014-04-30T01:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![le\_trung\_Trung](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@le\_trung\_Trung](https://discuss.elastic.co/u/le_trung_Trung)\
**Post date:** [April 30, 2014, 1:41am UTC](https://discuss.elastic.co/t/bug-of-term-suggester/17273/1 "2014-04-30T01:41:46Z")

</div>

Suggester wills return fail results if suggest mode is missing.

I have example:

#analyzer  
index:  
analysis:  
analyzer:  
vi\_analyzer:  
type: custom  
tokenizer: whitespace  
filter: [trim, lowercase, hunspell\_vi]  
filter:  
hunspell\_vi:  
type: hunspell  
locale: vi\_VN

# delete the index

curl -XDELETE localhost:9200/test

# insert a document

curl -XPUT localhost:9200/test/test/1 -d '{  
"title": "bong bay"  
}'

curl -XPUT localhost:9200/test/test/2 -d '{  
"title": "ba bong bong"  
}'

curl -XPUT localhost:9200/test/test/3 -d '{  
"title": "ba bong bay"  
}'

# Suggest

curl -XPOST 'localhost:9200/\_suggest' -d '{  
"\_suggestion" : {  
"text" : "ba",  
"term" : {  
"field" : "title",  
"suggest\_mode": "missing",  
"sort" : "score",  
"min\_word\_length" : 1  
}  
}  
}'

# Results

{"\_shards":{"total":52,"successful":52,"failed":0},"\_suggestion":  
[{"text":"ba","offset":0,"length":2,"options":[{"text":"bay","score":0.5,"freq":1}]}]}

--  
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/f27233c6-bcd9-47b6-b54a-9e67661562a8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f27233c6-bcd9-47b6-b54a-9e67661562a8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:32am UTC](https://discuss.elastic.co/t/bug-of-term-suggester/17273/2 "2017-07-06T01:32:36Z")

</div>


