Тип поля Completion
Для использования completion подсказчика, отобразите поле, из которого вы хотите генерировать предложения, как тип completion. Это индексирует значения поля для быстрых предложений.
resp = client.indices.create(
index="music",
mappings={
"properties": {
"suggest": {
"type": "completion"
}
}
},
)
print(resp) response = client.indices.create(
index: 'music',
body: {
mappings: {
properties: {
suggest: {
type: 'completion'
}
}
}
}
)
puts response const response = await client.indices.create({
index: "music",
mappings: {
properties: {
suggest: {
type: "completion",
},
},
},
});
console.log(response); PUT music
{
"mappings": {
"properties": {
"suggest": {
"type": "completion"
}
}
}
} Параметры для полей completion
Следующие параметры принимаются полями completion:
| Анализатор для индексации, по умолчанию | |
| Анализатор для поиска, по умолчанию значение | |
| | Сохраняет разделители, по умолчанию |
| | Включает приращения позиций, по умолчанию |
| | Ограничивает длину одного входного значения, по умолчанию |
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/completion.html