Hi,
the phrase suggester does not seem to be capable of removing erroneously introduced whitespace.
E.g. marktp latz
=> gives no suggestions, while for marktp_latz => marktplatz
actually is suggested.
The same for all cases where additional whitespace needs to be removed.
The term suggester however, is capable of suggesting marktp latz => marktplatz
.
I played with all params of the phrase suggester without luck (confidence, max_errors, etc). Is it a limitation or am i doing something wrong?
index setup:
{
settings: {
analysis: {
analyzer: {
suggest: {
type: 'custom',
tokenizer: 'standard',
filter: [
'lowercase',
'shingle_filter'
]
}
},
filter: {
shingle_filter: {
type: 'shingle',
min_shingle_size: 2,
max_shingle_size: 3
}
}
}
mapping:
...
suggestions: {
properties: {
de: { type: 'text', analyzer: 'suggest' },
en: { type: 'text', analyzer: 'suggest' },
fr: { type: 'text', analyzer: 'suggest' }
}
}
...
query:
"suggest": {
"my_suggestions": {
"text": "markt platz",
"phrase": {
"field": "suggestions.de"
}
}
}
}
Thx in advance