# Elasticsearch 5.6 Completion Suggester non-letter character problem

**URL:** https://discuss.elastic.co/t/elasticsearch-5-6-completion-suggester-non-letter-character-problem/130960
**Category:** Elasticsearch
**Created:** [May 8, 2018, 8:59am UTC](https://discuss.elastic.co/t/elasticsearch-5-6-completion-suggester-non-letter-character-problem/130960 "2018-05-08T08:59:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Adam\_Krajcs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_krajcs/32/45171_2.png) [@Adam\_Krajcs](https://discuss.elastic.co/u/Adam_Krajcs)
#### Post date: [May 8, 2018, 8:59am UTC](https://discuss.elastic.co/t/elasticsearch-5-6-completion-suggester-non-letter-character-problem/130960/1 "2018-05-08T08:59:45Z")

</div>

Hi,

We couldn't use the completion suggester for non-letter characters, like c++, or c#.  
The default analyzer of the completion suggester is the simple. So from the c# text itt will create the following token:  
{  
"tokens": [  
{  
"token": "c",  
"start\_offset": 0,  
"end\_offset": 1,  
"type": "word",  
"position": 0  
}  
]  
}  
We tried with whitespace tokenizer plus lowercase filter. It creates the perfect token:  
{  
"tokens": [  
{  
"token": "c#",  
"start\_offset": 0,  
"end\_offset": 2,  
"type": "word",  
"position": 0  
}  
]  
}

But the suggestion doesn't work

array (size=5)  
'took' =\> int 0  
'timed\_out' =\> boolean false  
'\_shards' =\>  
array (size=4)  
'total' =\> int 3  
'successful' =\> int 3  
'skipped' =\> int 0  
'failed' =\> int 0  
'hits' =\>  
array (size=3)  
'total' =\> int 0  
'max\_score' =\> float 0  
'hits' =\>  
array (size=0)  
empty  
'suggest' =\>  
array (size=1)  
'suggestion' =\>  
array (size=1)  
0 =\>  
array (size=4)  
'text' =\> string 'c#' (length=2)  
'offset' =\> int 0  
'length' =\> int 2  
'options' =\>  
array (size=0)  
empty

What should we do?

---

<div class="post-metadata">

### Author: ![Adam\_Krajcs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_krajcs/32/45171_2.png) [@Adam\_Krajcs](https://discuss.elastic.co/u/Adam_Krajcs)
#### Post date: [May 8, 2018, 9:20am UTC](https://discuss.elastic.co/t/elasticsearch-5-6-completion-suggester-non-letter-character-problem/130960/2 "2018-05-08T09:20:39Z")

</div>

It's been solved. There was a problem, with input data

---

<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: [June 5, 2018, 9:20am UTC](https://discuss.elastic.co/t/elasticsearch-5-6-completion-suggester-non-letter-character-problem/130960/3 "2018-06-05T09:20:39Z")

</div>

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