URI parts processor
editURI parts processor
editParses a Uniform Resource Identifier (URI) string and extracts its components as an object. This URI object includes properties for the URI’s domain, path, fragment, port, query, scheme, user info, username, and password.
Table 40. URI Parts Options
Name | Required | Default | Description |
---|---|---|---|
|
yes |
- |
Field containing the URI string. |
|
no |
|
Output field for the URI object. |
|
no |
true |
If |
|
no |
false |
If |
|
no |
- |
Conditionally execute this processor. |
|
no |
- |
Handle failures for this processor. See Handling failures in pipelines. |
|
no |
|
Ignore failures for this processor. See Handling failures in pipelines. |
|
no |
- |
An identifier for this processor. Useful for debugging and metrics. |
Here is an example definition of the URI parts processor:
{ "description" : "...", "processors" : [ { "uri_parts": { "field": "input_field", "target_field": "url", "keep_original": true, "remove_if_successful": false } } ] }
When the above processor executes on the following document:
{ "_source": { "input_field": "http://myusername:mypassword@www.example.com:80/foo.gif?key1=val1&key2=val2#fragment" } }
It produces this result:
"_source" : { "input_field" : "http://myusername:mypassword@www.example.com:80/foo.gif?key1=val1&key2=val2#fragment", "url" : { "path" : "/foo.gif", "fragment" : "fragment", "extension" : "gif", "password" : "mypassword", "original" : "http://myusername:mypassword@www.example.com:80/foo.gif?key1=val1&key2=val2#fragment", "scheme" : "http", "port" : 80, "user_info" : "myusername:mypassword", "domain" : "www.example.com", "query" : "key1=val1&key2=val2", "username" : "myusername" } }