Elasticsearch 5.6 Completion Suggester non-letter character problem

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?

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

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