elasticsearch/modules/ingest-common
Stuart Tettemer 264f09f3d5
Script: Common base class for write scripts (#89141)
Adds `WriteScript` as the common base class for the write scripts: `IngestScript`, `UpdateScript`, `UpdateByQueryScript` and `ReindexScript`.

This pulls the common `getCtx()` and `metadata()` methods into the base class and prepares for the implementation of the ingest fields api (https://github.com/elastic/elasticsearch/issues/79155).

As part of the refactor, `IngestScript` now takes a `CtxMap` directly rather than taking "sourceAndMetadata" (`CtxMap`) and `Metadata` (from `CtxMap`).  There is a new `getCtxMap()` getter to get the typed `CtxMap`.  `getSourceAndMetadata` could have been refactored to do this, but most of the callers of that don't need to know about `CtxMap` and are happy with a `Map<String, Object>`.
2022-08-09 12:31:18 -05:00
..
licenses Add verification metadata for dependencies (#88814) 2022-08-04 09:51:16 +02:00
src Script: Common base class for write scripts (#89141) 2022-08-09 12:31:18 -05:00
build.gradle Modularize the ingest.common component (as well as dissect and grok dependent libs) (#87219) 2022-05-30 17:08:13 +01:00