私は現在、elasticsearch (バージョン 0.90) からの新しい自動提案を試しています。実際にはうまく機能しますが、すべての提案結果が小文字で返されることに気付きました。私はドイツ語の Web サイトに自動提案を実装しようとしていますが、ドイツ語では名詞が常に大文字で書かれているため、小文字の提案しか得られないとドイツ語のユーザーを混乱させる可能性があります。ドキュメントに保存されている場合、提案を得る可能性はありますか?
例:
// I have this document in my index autosuggestion type staedte
{
_index: autosuggest
_type: staedte
_id: 11a40GY_QKaXbFT7RA51qA
_score: 1
_source: {
staedte: {
name: Berlin
}
}
}
// The following Request return the name of the city in lowercase
// Request
curl -XPOST 'http://localhost:9200/_suggest/' -d '
{
"my-suggestion": {
"text": "berlion",
"term": {
"field": "name",
"analyzer": "german",
"suggest_mode": "always"
}
}
}'
// Result
{
{
_shards: {
total: 5
successful: 5
failed: 0
}
my-suggestion: [{
text: berlion
offset: 0
length: 7
options: [{
text: berlin
score: 0.8333333
freq: 1
}]
}]
}