Add support for an ingest pipeline and resource file loading for configuration. #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added support to have documents run through an ingestion pipeline at indexing time. My use case is to add metadata when creating the meters and parse that metadata into additional fields at index time. An example being:
The original meter name field may look like this:
field1:value1|field2:value2|field3:value3
At index time, this metadata is processed into specific fields. Fo example:
...
"attributes": {
"field1": "value1",
"field2": "value2",
"field3": "value3"
}
...
In addition, for meter index and pipeline configuration, I added support for loading these at startup time.
Note: This code does work. Unfortunately, even though they're written, I cannot get the pipeline definition and the script loading unit tests to work. I debugged into the test code, and the Elasticsearch API states that script support has not been enabled. In looking through the various test sources, I was not able to see how add this support in a straightforward manner.
Note 2: Before I started my work, I manually copied/merged the files from @mfranklin's pull request (48) in order to keep the 5.x additions from getting out of hand from a merge perspective.