Es pipeline
来自三线的随记
GET _ingest/pipeline/_simulate
{
"pipeline": {
"processors": [
{
"split": {
"field": "message",
"separator": "----",
"target_field": "split"
}
},
{
"append": {
"field": "test1",
"value": [
"{{_source.split.0}}"
]
}
},
{
"append": {
"field": "test2",
"value": [
"{{_source.split.1}}"
]
}
},{
"remove":{
"field":"split"
}
}
]
},
"docs": [
{
"_source": {
"message": "abc----efff"
}
}
]
}
{
"docs" : [
{
"doc" : {
"_index" : "_index",
"_type" : "_doc",
"_id" : "_id",
"_source" : {
"test2" : [
"efff"
],
"message" : "abc----efff",
"test1" : [
"abc"
]
},
"_ingest" : {
"timestamp" : "2020-04-15T05:33:07.554732Z"
}
}
}
]
}