elasticsearch - Elasticsearch如何覆盖管道中的现有字段?
问题描述
在我的管道中,我提取了一个时间戳。我想覆盖现有的时间戳字段。我该怎么做?
管道:
{
"description": "...",
"processors": [
{
"grok": {
"field": "message",
"patterns": [
"{TIMESTAMP_ISO8601:timestamp2}"
],
}
}
]
}
我希望timestamp2覆盖原始时间戳字段。
解决方案
您可以像这样简单地覆盖字段名称:
"description": "...",
"processors": [
{
"grok": {
"field": "message",
"patterns": [
"%{TIMESTAMP_ISO8601:timestamp}" <--- use timestamp here instead of timestamp2
]
}
}
]
推荐阅读
- excel - 如何使用数字和文本值在 VBA 中使用 If And 语句创建 UDF?
- android - android studio 4.0.1:Android资源编译失败
- c# - Json.Net.Schema:如何生成只需要 [Required] 属性的模式?
- swiftui - 如何让一个简单的 SwiftUI 像 UITableView 一样加载(逻辑上!)
- python-3.x - PYTHON 3:UnboundLocalError 局部变量'x'在赋值之前引用
- flutter - 在没有 else 的文本小部件中颤振 if 语句
- c# - 更改颜色和背景颜色,色调
- oracle - 存储过程中的Oracle查询
- python - TypeError: __init__() 接受 1 个位置参数,但给定了 2 个 discord.py
- php - 从 MySQL 中的多插入获取 LAST_INSERT_ID()