This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUT _ingest/pipeline/func_add_last_update_time | |
| { | |
| "version": 1, | |
| "description": "any stage: add back last update timestamp using script approach", | |
| "processors": [ | |
| { | |
| "script": { | |
| "lang": "painless", | |
| "source": """ | |
| ctx.last_update_time = new Date(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST _ingest/pipeline/_simulate | |
| { | |
| "pipeline": { | |
| "processors": [ | |
| { | |
| "dissect": { | |
| "field": "message", | |
| "pattern": "%{user_id}:%{action}:%{action_id}:%{action_ts}:%{description}" | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST _ingest/pipeline/_simulate | |
| { | |
| "pipeline": { | |
| "processors": [ | |
| { | |
| "dissect": { | |
| "field": "message", | |
| "pattern": "%{user_id}:%{action}:%{action_id}:%{action_ts}:%{description}" | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUT _ingest/pipeline/func_convert_age | |
| { | |
| "processors": [ | |
| { | |
| "convert": { | |
| "field": "age", | |
| "type": "integer" | |
| } | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST _ingest/pipeline/_simulate | |
| { | |
| "pipeline": { | |
| "processors": [ | |
| { | |
| "dissect": { | |
| "field": "message", | |
| "pattern": "%{name}:%{age}" | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "docs" : [ | |
| { | |
| "doc" : { | |
| "_index" : "_index", | |
| "_type" : "_type", | |
| "_id" : "_id", | |
| "_source" : { | |
| "name" : "helen wong", | |
| "message" : "helen wong:45", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST _ingest/pipeline/_simulate | |
| { | |
| "pipeline": { | |
| "processors": [ | |
| { | |
| "dissect": { | |
| "field": "message", | |
| "pattern": "%{name}:%{age}" | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUT app_log_1 | |
| { | |
| "settings": { | |
| "default_pipeline": "add_last_update_time" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mappings (tbl_publisher records) | |
| PUT blog_enrich_publisher | |
| { | |
| "mappings": { | |
| "properties": { | |
| "id": { | |
| "type": "keyword" | |
| }, | |
| "name": { | |
| "type": "text", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mapping (tbl_books) | |
| PUT blog_enrich_books | |
| { | |
| "mappings": { | |
| "properties": { | |
| "pub_id": { | |
| "type": "keyword" | |
| }, | |
| "name": { | |
| "type": "text", |