# Why completion suggester return keywords size wrong

**URL:** <https://discuss.elastic.co/t/why-completion-suggester-return-keywords-size-wrong/69511>\
**Category:** Elasticsearch\
**Created:** [December 20, 2016, 3:21am UTC](https://discuss.elastic.co/t/why-completion-suggester-return-keywords-size-wrong/69511 "2016-12-20T03:21:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CCMBChina](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@CCMBChina](https://discuss.elastic.co/u/CCMBChina)\
**Post date:** [December 20, 2016, 3:21am UTC](https://discuss.elastic.co/t/why-completion-suggester-return-keywords-size-wrong/69511/1 "2016-12-20T03:21:16Z")

</div>

Elasticsearch version:  
2.2  
Plugins installed: []  
head  
JVM version:  
1.7  
OS version:  
linux 2.6  
Description of the problem including expected versus actual behavior:

when using completion suggester in production,i find a problem that when i input a character ‘o’, by which completion suggester should show 10 keywords that starts with prefix 'o',but unexpectedly, only 5 words in the list.i do not know why.  
in production,i use this tempalte,and i use 10 indices to suggest,like curl -XPOST localhost:9200/suggest-a,suggest-b,suggest-c,suggest-d,suggest-e,suggest-f,suggest-g,suggest-h,suggest-i,suggest-j/\_suggest,every indice exists 10000 datas,and the size is 20:  
curl -XPUT localhost:9200/\_template/template\_suggest -d '{  
"template" : "suggest-\*",  
"settings": {  
"number\_of\_shards" : 3  
},  
"mappings" : {  
"suggest" : {  
"properties" : {  
"word" : {  
"type" : "string",  
"index" : "not\_analyzed"  
},  
"suggest" : {  
"type" : "completion",  
"analyzer" : "standard",  
"search\_analyzer" : "standard",  
"preserve\_separators" : false,  
"max\_input\_length" : 100,  
"payloads" : true  
}  
}  
}  
}  
}'  
is it cache or 3 shards that lead to this problem?  
It is strange that when i reindex this suggest index ,it may show 6 keywords or 7 keywords,but still uncompleted.  
i use java api ,and what is the meaning of shardSize in CompletionSuggestionBuilder

---

<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:** [January 17, 2017, 3:21am UTC](https://discuss.elastic.co/t/why-completion-suggester-return-keywords-size-wrong/69511/2 "2017-01-17T03:21:24Z")

</div>

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