尝试在我的代码中设置user.keyword,但给出了Elasticsearch的错误
我试图将其添加
"field": "participant-id.keyword",
到我的文档中,
{
"event": {
"properties": {
"participant-id": {
"type": "text",
"fields":{
"keyword":{
"type": "keyword",
"field": "participant-id.keyword",
"ignore_above": 256
}
}
}
}
}
}
这给了我这个错误,我相信我在错误的行中添加了.keyword
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [fields] has unsupported parameters: [field : participant-id.keyword]"
}
],
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [fields] has unsupported parameters: [field : participant-id.keyword]"
},
"status": 400
}
i tried to add this
"field": "participant-id.keyword",
to my document
{
"event": {
"properties": {
"participant-id": {
"type": "text",
"fields":{
"keyword":{
"type": "keyword",
"field": "participant-id.keyword",
"ignore_above": 256
}
}
}
}
}
}
It gave me this error , I believe i added .keyword in wrong line
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [fields] has unsupported parameters: [field : participant-id.keyword]"
}
],
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [fields] has unsupported parameters: [field : participant-id.keyword]"
},
"status": 400
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“字段”不是“字段”中的预定参数>参与者-ID.KeyWord 自动为您而言,您无需自己定义它。
所以应该这样的事情:
"field" is not a predefined parameter in "fields" so it throws an error and can't be used there, and I don't see any necessity to use that because when you add a keyword type to a field it creates
participant-id.keyword
automatically for you and you don't need to define it by yourself.so it should be something like this: