Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save djptek/28a0ccb8ce1b72ce1ae84c73f1b30f8d to your computer and use it in GitHub Desktop.
Save djptek/28a0ccb8ce1b72ce1ae84c73f1b30f8d to your computer and use it in GitHub Desktop.
# (updated 2019/07/05 thanks @pmusa)
###########
GET _ingest/processor/grok
POST _ingest/pipeline/_simulate
{
"pipeline": {
"description": "parse major.minor.patch to sub-fields",
"processors": [
{
"grok": {
"field": "version.display_name",
"patterns": [
"%{INT:version.major:int}.%{INT:version.minor:int}.%{INT:version.bugfix:int}"
]
}
}
]
},
"docs": [
{
"_source": {
"version": {
"display_name": "6.2.1"
}
}
}
]
}
###########
@djptek
Copy link
Author

djptek commented Jul 5, 2019

@pmusa now I see! Thanks, I'll update the example above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment