【发布时间】:2020-06-15 18:25:40
【问题描述】:
我将在 client.index 函数中添加额外的设置细节。 这是我尝试过的。
return client
.index({
index: indexName,
type: "file",
id: bucketName + "/" + fileKey,
body: {
title: fileName,
content: contentString,
fileKey: fileKey,
bucketName: bucketName,
updated: Date.now(),
type: fileType,
},
})
如何将分析详细信息放入其中? 这就是我要说的。
{
settings: {
analysis: {
analyze: {
tokenizer: "icu-tokenizer"
}
}
}
}
最后应该是这样的:
{
"ghej": {
"aliases": {},
"mappings": {},
"settings": {
"index": {
"number_of_shards": "5",
"provided_name": "ghej",
"creation_date": "1592239308694",
"analysis": {
"analyzer": {
"content": {
"type": "custom",
"tokenizer": "icu_tokenizer"
}
}
},
"number_of_replicas": "1",
"uuid": "1yX6z-eARdyNakJwM6Z3ow",
"version": {
"created": "7010199"
}
}
}
}
}
任何帮助将不胜感激。
【问题讨论】:
标签: javascript elasticsearch aws-sdk aws-elasticsearch