Skip to content

Instantly share code, notes, and snippets.

@quoeamaster
Last active April 14, 2022 06:29
Show Gist options
  • Select an option

  • Save quoeamaster/f12f278d887ee798e2317dad811a02bd to your computer and use it in GitHub Desktop.

Select an option

Save quoeamaster/f12f278d887ee798e2317dad811a02bd to your computer and use it in GitHub Desktop.
PUT _ingest/pipeline/test_p2
{
"processors": [
{
"gsub": {
"field": "instructors",
"pattern": "\\.",
"replacement": "-"
}
}
]
}
/* test */
POST _ingest/pipeline/test_p2/_simulate
{
"docs": [
{
"_source": {
"instructors": "donna.karen@uni.gov,jojo.star.crusade@uni.gov"
}
}
]
}
...
/* results~ */
{
"docs" : [
{
"doc" : {
"_index" : "_index",
"_type" : "_doc",
"_id" : "_id",
"_source" : {
"instructors" : "donna-karen@uni-gov,jojo-star-crusade@uni-gov"
},
"_ingest" : {
"timestamp" : "2022-04-14T06:12:12.161522158Z"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment