Forked from djptek/Modeling_Granular_Fields_Parse_Display_Name_to_Major_Minor_Bugfix.painless
Created
June 12, 2018 10:35
-
-
Save eedugon/5ef9b7fa94f1d42e492c5184f0f05b4d to your computer and use it in GitHub Desktop.
This file contains 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
########### | |
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:version.minor}.%{INT:version.bugfix}" | |
] | |
} | |
}, | |
{ | |
"convert": { | |
"field" : "version.major", | |
"type": "integer" | |
} | |
}, | |
{ | |
"convert": { | |
"field" : "version.minor", | |
"type": "integer" | |
} | |
}, | |
{ | |
"convert": { | |
"field" : "version.bugfix", | |
"type": "integer" | |
} | |
} | |
] | |
}, | |
"docs": [ | |
{ | |
"_source": { | |
"version": { | |
"display_name": "6.2.1" | |
} | |
} | |
} | |
] | |
} | |
########### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment