From 2fd1c236b91c5866dbbb3ee070e7fd699ff08ec1 Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Tue, 29 Jul 2025 17:48:41 +0200 Subject: [PATCH 1/3] 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 ffce3bc4f007561047cf9d63995ceeb507d827b8 Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Tue, 29 Jul 2025 18:07:26 +0200 Subject: [PATCH 2/3] 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 09df19a9ce..faf5fad22f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -104545,7 +104545,7 @@ ] }, "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" @@ -104558,6 +104558,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, @@ -104565,8 +104568,7 @@ } }, "required": [ - "field", - "value" + "field" ] } ] diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 9abc66cf84..9c66a8b2a4 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -67855,7 +67855,7 @@ ] }, "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" @@ -67868,6 +67868,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, @@ -67875,8 +67878,7 @@ } }, "required": [ - "field", - "value" + "field" ] } ] diff --git a/output/schema/schema.json b/output/schema/schema.json index f2fc92a22d..2dd4d45ca3 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -181421,9 +181421,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": [ @@ -181439,6 +181439,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", @@ -181453,7 +181465,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L329-L344" + "specLocation": "ingest/_types/Processors.ts#L329-L348" }, { "kind": "interface", @@ -181573,7 +181585,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L346-L387" + "specLocation": "ingest/_types/Processors.ts#L350-L391" }, { "kind": "interface", @@ -181627,7 +181639,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L556-L572" + "specLocation": "ingest/_types/Processors.ts#L560-L576" }, { "kind": "interface", @@ -181704,7 +181716,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L574-L597" + "specLocation": "ingest/_types/Processors.ts#L578-L601" }, { "kind": "interface", @@ -181863,7 +181875,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L599-L660" + "specLocation": "ingest/_types/Processors.ts#L603-L664" }, { "kind": "interface", @@ -181929,7 +181941,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L673-L693" + "specLocation": "ingest/_types/Processors.ts#L677-L697" }, { "kind": "enum", @@ -181963,7 +181975,7 @@ "name": "ConvertType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L662-L671" + "specLocation": "ingest/_types/Processors.ts#L666-L675" }, { "kind": "interface", @@ -182061,7 +182073,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L695-L728" + "specLocation": "ingest/_types/Processors.ts#L699-L732" }, { "kind": "interface", @@ -182286,7 +182298,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L730-L768" + "specLocation": "ingest/_types/Processors.ts#L734-L772" }, { "kind": "interface", @@ -182381,7 +182393,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L770-L803" + "specLocation": "ingest/_types/Processors.ts#L774-L807" }, { "kind": "interface", @@ -182447,7 +182459,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L805-L824" + "specLocation": "ingest/_types/Processors.ts#L809-L828" }, { "kind": "interface", @@ -182682,7 +182694,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L826-L844" + "specLocation": "ingest/_types/Processors.ts#L830-L848" }, { "kind": "interface", @@ -182697,7 +182709,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L846-L846" + "specLocation": "ingest/_types/Processors.ts#L850-L850" }, { "kind": "interface", @@ -182801,7 +182813,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L848-L887" + "specLocation": "ingest/_types/Processors.ts#L852-L891" }, { "kind": "interface", @@ -182829,7 +182841,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L889-L895" + "specLocation": "ingest/_types/Processors.ts#L893-L899" }, { "kind": "enum", @@ -182859,7 +182871,7 @@ "name": "FingerprintDigest", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L897-L903" + "specLocation": "ingest/_types/Processors.ts#L901-L907" }, { "kind": "interface", @@ -182938,7 +182950,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L905-L933" + "specLocation": "ingest/_types/Processors.ts#L909-L937" }, { "kind": "interface", @@ -182991,7 +183003,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L935-L949" + "specLocation": "ingest/_types/Processors.ts#L939-L953" }, { "kind": "interface", @@ -183118,7 +183130,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L389-L430" + "specLocation": "ingest/_types/Processors.ts#L393-L434" }, { "kind": "enum", @@ -183134,7 +183146,7 @@ "name": "GeoGridTargetFormat", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L438-L441" + "specLocation": "ingest/_types/Processors.ts#L442-L445" }, { "kind": "enum", @@ -183153,7 +183165,7 @@ "name": "GeoGridTileType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L432-L436" + "specLocation": "ingest/_types/Processors.ts#L436-L440" }, { "kind": "interface", @@ -183260,7 +183272,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L443-L477" + "specLocation": "ingest/_types/Processors.ts#L447-L481" }, { "kind": "interface", @@ -183365,7 +183377,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L951-L982" + "specLocation": "ingest/_types/Processors.ts#L955-L986" }, { "kind": "interface", @@ -183443,7 +183455,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L984-L1008" + "specLocation": "ingest/_types/Processors.ts#L988-L1012" }, { "kind": "interface", @@ -183497,7 +183509,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1010-L1026" + "specLocation": "ingest/_types/Processors.ts#L1014-L1030" }, { "kind": "interface", @@ -183531,7 +183543,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1067-L1079", + "specLocation": "ingest/_types/Processors.ts#L1071-L1083", "variants": { "kind": "container" } @@ -183608,7 +183620,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1094-L1120" + "specLocation": "ingest/_types/Processors.ts#L1098-L1124" }, { "kind": "interface", @@ -183644,7 +183656,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1081-L1092" + "specLocation": "ingest/_types/Processors.ts#L1085-L1096" }, { "kind": "interface", @@ -183755,7 +183767,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1028-L1060" + "specLocation": "ingest/_types/Processors.ts#L1032-L1064" }, { "kind": "interface", @@ -183836,7 +183848,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1062-L1065" + "specLocation": "ingest/_types/Processors.ts#L1066-L1069" }, { "kind": "interface", @@ -183943,7 +183955,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L479-L513" + "specLocation": "ingest/_types/Processors.ts#L483-L517" }, { "kind": "interface", @@ -184005,7 +184017,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1122-L1137" + "specLocation": "ingest/_types/Processors.ts#L1126-L1141" }, { "kind": "interface", @@ -184084,7 +184096,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1139-L1168" + "specLocation": "ingest/_types/Processors.ts#L1143-L1172" }, { "kind": "enum", @@ -184102,7 +184114,7 @@ "name": "JsonProcessorConflictStrategy", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1170-L1175" + "specLocation": "ingest/_types/Processors.ts#L1174-L1179" }, { "kind": "interface", @@ -184259,7 +184271,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1177-L1229" + "specLocation": "ingest/_types/Processors.ts#L1181-L1233" }, { "kind": "interface", @@ -184334,7 +184346,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1231-L1247" + "specLocation": "ingest/_types/Processors.ts#L1235-L1251" }, { "kind": "interface", @@ -184450,7 +184462,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1249-L1283" + "specLocation": "ingest/_types/Processors.ts#L1253-L1287" }, { "kind": "interface", @@ -184719,7 +184731,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1285-L1296" + "specLocation": "ingest/_types/Processors.ts#L1289-L1300" }, { "kind": "interface", @@ -185702,7 +185714,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1298-L1339" + "specLocation": "ingest/_types/Processors.ts#L1302-L1343" }, { "kind": "interface", @@ -185755,7 +185767,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1341-L1357" + "specLocation": "ingest/_types/Processors.ts#L1345-L1361" }, { "kind": "interface", @@ -185808,7 +185820,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1359-L1373" + "specLocation": "ingest/_types/Processors.ts#L1363-L1377" }, { "kind": "interface", @@ -185861,7 +185873,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1375-L1391" + "specLocation": "ingest/_types/Processors.ts#L1379-L1395" }, { "kind": "interface", @@ -185943,7 +185955,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1393-L1421" + "specLocation": "ingest/_types/Processors.ts#L1397-L1425" }, { "kind": "interface", @@ -186015,7 +186027,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1423-L1443" + "specLocation": "ingest/_types/Processors.ts#L1427-L1447" }, { "kind": "interface", @@ -186101,7 +186113,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1445-L1479" + "specLocation": "ingest/_types/Processors.ts#L1449-L1483" }, { "kind": "interface", @@ -186144,7 +186156,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1481-L1490" + "specLocation": "ingest/_types/Processors.ts#L1485-L1494" }, { "kind": "enum", @@ -186160,7 +186172,7 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1492-L1495" + "specLocation": "ingest/_types/Processors.ts#L1496-L1499" }, { "kind": "interface", @@ -186259,7 +186271,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1497-L1513" + "specLocation": "ingest/_types/Processors.ts#L1501-L1517" }, { "kind": "interface", @@ -186338,7 +186350,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1515-L1540" + "specLocation": "ingest/_types/Processors.ts#L1519-L1544" }, { "kind": "interface", @@ -186353,7 +186365,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L1542-L1542" + "specLocation": "ingest/_types/Processors.ts#L1546-L1546" }, { "kind": "interface", @@ -186407,7 +186419,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1544-L1560" + "specLocation": "ingest/_types/Processors.ts#L1548-L1564" }, { "kind": "interface", @@ -186461,7 +186473,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1562-L1578" + "specLocation": "ingest/_types/Processors.ts#L1566-L1582" }, { "kind": "interface", @@ -186541,7 +186553,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1598-L1624" + "specLocation": "ingest/_types/Processors.ts#L1602-L1628" }, { "kind": "interface", @@ -186595,7 +186607,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1580-L1596" + "specLocation": "ingest/_types/Processors.ts#L1584-L1600" }, { "kind": "interface", @@ -186708,7 +186720,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L515-L546" + "specLocation": "ingest/_types/Processors.ts#L519-L550" }, { "kind": "enum", @@ -186733,7 +186745,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 1bea18a6f8..d22956e3dd 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14850,7 +14850,8 @@ export type InferenceUpdateResponse = InferenceInferenceEndpointInfo export interface IngestAppendProcessor extends IngestProcessorBase { field: Field - value: any | any[] + value?: any | any[] + copy_from?: Field allow_duplicates?: boolean } From 1571fe32ea3565e01a7685079211b4e3fc1a5c68 Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Fri, 5 Sep 2025 15:28:20 +0200 Subject: [PATCH 3/3] Update to use wording used in final ES PR. --- output/schema/schema.json | 2 +- specification/ingest/_types/Processors.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 2dd4d45ca3..fb57f2a611 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -181440,7 +181440,7 @@ } }, { - "description": "The source field to be append. Cannot set `value` simultaneously.", + "description": "The origin field which will be appended to `field`, cannot set `value` simultaneously.", "name": "copy_from", "required": false, "type": { diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index acef457171..0b3d08e272 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -337,7 +337,7 @@ export class AppendProcessor extends ProcessorBase { */ value?: UserDefinedValue | UserDefinedValue[] /** - * The source field to be append. Cannot set `value` simultaneously. + * The origin field which will be appended to `field`, cannot set `value` simultaneously. */ copy_from?: Field /**