From 6d62261c4a5a54962b8035e7c1ca3e5d929796fc Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Tue, 29 Jul 2025 17:48:41 +0200 Subject: [PATCH 1/2] Add the copy_from option to the Append processor. --- specification/ingest/_types/Processors.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index 1455df044a..acef457171 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -333,9 +333,13 @@ export class AppendProcessor extends ProcessorBase { */ field: Field /** - * The value to be appended. Supports template snippets. + * The value to be appended. Supports template snippets. May specify only one of `value` or `copy_from`. */ - value: UserDefinedValue | UserDefinedValue[] + value?: UserDefinedValue | UserDefinedValue[] + /** + * The source field to be append. Cannot set `value` simultaneously. + */ + copy_from?: Field /** * If `false`, the processor does not append values already present in the field. * @server_default true From fde192d9a10b5d1a2a13b12ed36aff93784c922d Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Tue, 29 Jul 2025 18:07:26 +0200 Subject: [PATCH 2/2] Add generated output. --- output/openapi/elasticsearch-openapi.json | 8 +- .../elasticsearch-serverless-openapi.json | 8 +- output/schema/schema.json | 128 ++++++++++-------- output/typescript/types.ts | 3 +- 4 files changed, 82 insertions(+), 65 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f2eba8418c..25dabba04f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -91088,7 +91088,7 @@ "$ref": "#/components/schemas/_types.Field" }, "value": { - "description": "The value to be appended. Supports template snippets.", + "description": "The value to be appended. Supports template snippets. May specify only one of `value` or `copy_from`.", "oneOf": [ { "type": "object" @@ -91101,6 +91101,9 @@ } ] }, + "copy_from": { + "$ref": "#/components/schemas/_types.Field" + }, "allow_duplicates": { "description": "If `false`, the processor does not append values already present in the field.", "default": true, @@ -91108,8 +91111,7 @@ } }, "required": [ - "field", - "value" + "field" ] } ] diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 3f5396cb82..d67f95f078 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -58200,7 +58200,7 @@ "$ref": "#/components/schemas/_types.Field" }, "value": { - "description": "The value to be appended. Supports template snippets.", + "description": "The value to be appended. Supports template snippets. May specify only one of `value` or `copy_from`.", "oneOf": [ { "type": "object" @@ -58213,6 +58213,9 @@ } ] }, + "copy_from": { + "$ref": "#/components/schemas/_types.Field" + }, "allow_duplicates": { "description": "If `false`, the processor does not append values already present in the field.", "default": true, @@ -58220,8 +58223,7 @@ } }, "required": [ - "field", - "value" + "field" ] } ] diff --git a/output/schema/schema.json b/output/schema/schema.json index 6ef363d3ac..892f7af9d8 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -177943,9 +177943,9 @@ } }, { - "description": "The value to be appended. Supports template snippets.", + "description": "The value to be appended. Supports template snippets. May specify only one of `value` or `copy_from`.", "name": "value", - "required": true, + "required": false, "type": { "kind": "union_of", "items": [ @@ -177961,6 +177961,18 @@ ] } }, + { + "description": "The source field to be append. Cannot set `value` simultaneously.", + "name": "copy_from", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, { "description": "If `false`, the processor does not append values already present in the field.", "name": "allow_duplicates", @@ -177975,7 +177987,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L329-L344" + "specLocation": "ingest/_types/Processors.ts#L329-L348" }, { "kind": "interface", @@ -178095,7 +178107,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L346-L387" + "specLocation": "ingest/_types/Processors.ts#L350-L391" }, { "kind": "interface", @@ -178149,7 +178161,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L556-L572" + "specLocation": "ingest/_types/Processors.ts#L560-L576" }, { "kind": "interface", @@ -178226,7 +178238,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L574-L597" + "specLocation": "ingest/_types/Processors.ts#L578-L601" }, { "kind": "interface", @@ -178385,7 +178397,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L599-L660" + "specLocation": "ingest/_types/Processors.ts#L603-L664" }, { "kind": "interface", @@ -178451,7 +178463,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L673-L693" + "specLocation": "ingest/_types/Processors.ts#L677-L697" }, { "kind": "enum", @@ -178485,7 +178497,7 @@ "name": "ConvertType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L662-L671" + "specLocation": "ingest/_types/Processors.ts#L666-L675" }, { "kind": "interface", @@ -178583,7 +178595,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L695-L728" + "specLocation": "ingest/_types/Processors.ts#L699-L732" }, { "kind": "interface", @@ -178808,7 +178820,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L730-L768" + "specLocation": "ingest/_types/Processors.ts#L734-L772" }, { "kind": "interface", @@ -178903,7 +178915,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L770-L803" + "specLocation": "ingest/_types/Processors.ts#L774-L807" }, { "kind": "interface", @@ -178969,7 +178981,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L805-L824" + "specLocation": "ingest/_types/Processors.ts#L809-L828" }, { "kind": "interface", @@ -179204,7 +179216,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L826-L844" + "specLocation": "ingest/_types/Processors.ts#L830-L848" }, { "kind": "interface", @@ -179219,7 +179231,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L846-L846" + "specLocation": "ingest/_types/Processors.ts#L850-L850" }, { "kind": "interface", @@ -179323,7 +179335,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L848-L887" + "specLocation": "ingest/_types/Processors.ts#L852-L891" }, { "kind": "interface", @@ -179351,7 +179363,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L889-L895" + "specLocation": "ingest/_types/Processors.ts#L893-L899" }, { "kind": "enum", @@ -179381,7 +179393,7 @@ "name": "FingerprintDigest", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L897-L903" + "specLocation": "ingest/_types/Processors.ts#L901-L907" }, { "kind": "interface", @@ -179460,7 +179472,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L905-L933" + "specLocation": "ingest/_types/Processors.ts#L909-L937" }, { "kind": "interface", @@ -179513,7 +179525,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L935-L949" + "specLocation": "ingest/_types/Processors.ts#L939-L953" }, { "kind": "interface", @@ -179640,7 +179652,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L389-L430" + "specLocation": "ingest/_types/Processors.ts#L393-L434" }, { "kind": "enum", @@ -179656,7 +179668,7 @@ "name": "GeoGridTargetFormat", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L438-L441" + "specLocation": "ingest/_types/Processors.ts#L442-L445" }, { "kind": "enum", @@ -179675,7 +179687,7 @@ "name": "GeoGridTileType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L432-L436" + "specLocation": "ingest/_types/Processors.ts#L436-L440" }, { "kind": "interface", @@ -179782,7 +179794,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L443-L477" + "specLocation": "ingest/_types/Processors.ts#L447-L481" }, { "kind": "interface", @@ -179887,7 +179899,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L951-L982" + "specLocation": "ingest/_types/Processors.ts#L955-L986" }, { "kind": "interface", @@ -179965,7 +179977,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L984-L1008" + "specLocation": "ingest/_types/Processors.ts#L988-L1012" }, { "kind": "interface", @@ -180019,7 +180031,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1010-L1026" + "specLocation": "ingest/_types/Processors.ts#L1014-L1030" }, { "kind": "interface", @@ -180053,7 +180065,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1067-L1079", + "specLocation": "ingest/_types/Processors.ts#L1071-L1083", "variants": { "kind": "container" } @@ -180130,7 +180142,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1094-L1120" + "specLocation": "ingest/_types/Processors.ts#L1098-L1124" }, { "kind": "interface", @@ -180166,7 +180178,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1081-L1092" + "specLocation": "ingest/_types/Processors.ts#L1085-L1096" }, { "kind": "interface", @@ -180277,7 +180289,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1028-L1060" + "specLocation": "ingest/_types/Processors.ts#L1032-L1064" }, { "kind": "interface", @@ -180358,7 +180370,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1062-L1065" + "specLocation": "ingest/_types/Processors.ts#L1066-L1069" }, { "kind": "interface", @@ -180465,7 +180477,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L479-L513" + "specLocation": "ingest/_types/Processors.ts#L483-L517" }, { "kind": "interface", @@ -180527,7 +180539,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1122-L1137" + "specLocation": "ingest/_types/Processors.ts#L1126-L1141" }, { "kind": "interface", @@ -180606,7 +180618,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1139-L1168" + "specLocation": "ingest/_types/Processors.ts#L1143-L1172" }, { "kind": "enum", @@ -180624,7 +180636,7 @@ "name": "JsonProcessorConflictStrategy", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1170-L1175" + "specLocation": "ingest/_types/Processors.ts#L1174-L1179" }, { "kind": "interface", @@ -180781,7 +180793,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1177-L1229" + "specLocation": "ingest/_types/Processors.ts#L1181-L1233" }, { "kind": "interface", @@ -180856,7 +180868,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1231-L1247" + "specLocation": "ingest/_types/Processors.ts#L1235-L1251" }, { "kind": "interface", @@ -180972,7 +180984,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1249-L1283" + "specLocation": "ingest/_types/Processors.ts#L1253-L1287" }, { "kind": "interface", @@ -181151,7 +181163,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1285-L1296" + "specLocation": "ingest/_types/Processors.ts#L1289-L1300" }, { "kind": "interface", @@ -182134,7 +182146,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1298-L1339" + "specLocation": "ingest/_types/Processors.ts#L1302-L1343" }, { "kind": "interface", @@ -182187,7 +182199,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1341-L1357" + "specLocation": "ingest/_types/Processors.ts#L1345-L1361" }, { "kind": "interface", @@ -182240,7 +182252,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1359-L1373" + "specLocation": "ingest/_types/Processors.ts#L1363-L1377" }, { "kind": "interface", @@ -182293,7 +182305,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1375-L1391" + "specLocation": "ingest/_types/Processors.ts#L1379-L1395" }, { "kind": "interface", @@ -182375,7 +182387,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1393-L1421" + "specLocation": "ingest/_types/Processors.ts#L1397-L1425" }, { "kind": "interface", @@ -182447,7 +182459,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1423-L1443" + "specLocation": "ingest/_types/Processors.ts#L1427-L1447" }, { "kind": "interface", @@ -182533,7 +182545,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1445-L1479" + "specLocation": "ingest/_types/Processors.ts#L1449-L1483" }, { "kind": "interface", @@ -182576,7 +182588,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1481-L1490" + "specLocation": "ingest/_types/Processors.ts#L1485-L1494" }, { "kind": "enum", @@ -182592,7 +182604,7 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1492-L1495" + "specLocation": "ingest/_types/Processors.ts#L1496-L1499" }, { "kind": "interface", @@ -182691,7 +182703,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1497-L1513" + "specLocation": "ingest/_types/Processors.ts#L1501-L1517" }, { "kind": "interface", @@ -182770,7 +182782,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1515-L1540" + "specLocation": "ingest/_types/Processors.ts#L1519-L1544" }, { "kind": "interface", @@ -182785,7 +182797,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L1542-L1542" + "specLocation": "ingest/_types/Processors.ts#L1546-L1546" }, { "kind": "interface", @@ -182839,7 +182851,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1544-L1560" + "specLocation": "ingest/_types/Processors.ts#L1548-L1564" }, { "kind": "interface", @@ -182893,7 +182905,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1562-L1578" + "specLocation": "ingest/_types/Processors.ts#L1566-L1582" }, { "kind": "interface", @@ -182973,7 +182985,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1598-L1624" + "specLocation": "ingest/_types/Processors.ts#L1602-L1628" }, { "kind": "interface", @@ -183027,7 +183039,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1580-L1596" + "specLocation": "ingest/_types/Processors.ts#L1584-L1600" }, { "kind": "interface", @@ -183140,7 +183152,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L515-L546" + "specLocation": "ingest/_types/Processors.ts#L519-L550" }, { "kind": "enum", @@ -183165,7 +183177,7 @@ "name": "UserAgentProperty", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L548-L554" + "specLocation": "ingest/_types/Processors.ts#L552-L558" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5bb3d52252..215331be0e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14715,7 +14715,8 @@ export type InferenceUpdateResponse = InferenceInferenceEndpointInfo export interface IngestAppendProcessor extends IngestProcessorBase { field: Field - value: any | any[] + value?: any | any[] + copy_from?: Field allow_duplicates?: boolean }