From b728d22585719f608aed7ddd15b9cff3ddf56138 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 6 Mar 2025 13:31:22 +0400 Subject: [PATCH] Add index-time scripts to date properties --- output/schema/schema.json | 100 +++++++++++++++++++-------- output/typescript/types.ts | 4 ++ specification/_types/mapping/core.ts | 4 ++ 3 files changed, 80 insertions(+), 28 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 9cc9180909..2cc01d83ab 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -75670,7 +75670,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L172-L175" + "specLocation": "_types/mapping/core.ts#L176-L179" }, { "kind": "interface", @@ -75968,6 +75968,28 @@ } } }, + { + "name": "script", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Script", + "namespace": "_types" + } + } + }, + { + "name": "on_script_error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "OnScriptError", + "namespace": "_types.mapping" + } + } + }, { "name": "null_value", "required": false, @@ -75999,7 +76021,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L78-L86" + "specLocation": "_types/mapping/core.ts#L80-L90" }, { "kind": "interface", @@ -76069,6 +76091,28 @@ } } }, + { + "name": "script", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Script", + "namespace": "_types" + } + } + }, + { + "name": "on_script_error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "OnScriptError", + "namespace": "_types.mapping" + } + } + }, { "name": "null_value", "required": false, @@ -76111,7 +76155,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L66-L76" + "specLocation": "_types/mapping/core.ts#L66-L78" }, { "kind": "interface", @@ -76436,7 +76480,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L152-L155" + "specLocation": "_types/mapping/core.ts#L156-L159" }, { "kind": "interface", @@ -76761,7 +76805,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L302-L333" + "specLocation": "_types/mapping/core.ts#L306-L337" }, { "kind": "interface", @@ -77381,7 +77425,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L142-L145" + "specLocation": "_types/mapping/core.ts#L146-L149" }, { "kind": "interface", @@ -77654,7 +77698,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L147-L150" + "specLocation": "_types/mapping/core.ts#L151-L154" }, { "kind": "interface", @@ -77934,7 +77978,7 @@ "name": "IndexOptions", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L258-L263" + "specLocation": "_types/mapping/core.ts#L262-L267" }, { "kind": "interface", @@ -77969,7 +78013,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L157-L160" + "specLocation": "_types/mapping/core.ts#L161-L164" }, { "kind": "interface", @@ -78199,7 +78243,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L88-L92" + "specLocation": "_types/mapping/core.ts#L92-L96" }, { "kind": "interface", @@ -78376,7 +78420,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L94-L113" + "specLocation": "_types/mapping/core.ts#L98-L117" }, { "kind": "interface", @@ -78411,7 +78455,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L162-L165" + "specLocation": "_types/mapping/core.ts#L166-L169" }, { "kind": "interface", @@ -78516,7 +78560,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L231-L256" + "specLocation": "_types/mapping/core.ts#L235-L260" }, { "kind": "enum", @@ -78736,7 +78780,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L115-L135" + "specLocation": "_types/mapping/core.ts#L119-L139" }, { "kind": "interface", @@ -78798,7 +78842,7 @@ "name": "OnScriptError", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L137-L140" + "specLocation": "_types/mapping/core.ts#L141-L144" }, { "kind": "interface", @@ -78879,7 +78923,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L188-L190" + "specLocation": "_types/mapping/core.ts#L192-L194" }, { "kind": "interface", @@ -79508,7 +79552,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L192-L195" + "specLocation": "_types/mapping/core.ts#L196-L199" }, { "kind": "interface", @@ -79543,7 +79587,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L197-L200" + "specLocation": "_types/mapping/core.ts#L201-L204" }, { "kind": "interface", @@ -79828,7 +79872,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L182-L186" + "specLocation": "_types/mapping/core.ts#L186-L190" }, { "kind": "interface", @@ -79963,7 +80007,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L212-L223" + "specLocation": "_types/mapping/core.ts#L216-L227" }, { "kind": "interface", @@ -80014,7 +80058,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L206-L210" + "specLocation": "_types/mapping/core.ts#L210-L214" }, { "kind": "interface", @@ -80120,7 +80164,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L167-L170" + "specLocation": "_types/mapping/core.ts#L171-L174" }, { "kind": "interface", @@ -80267,7 +80311,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L202-L204" + "specLocation": "_types/mapping/core.ts#L206-L208" }, { "kind": "enum", @@ -80445,7 +80489,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L265-L268" + "specLocation": "_types/mapping/core.ts#L269-L272" }, { "kind": "interface", @@ -80658,7 +80702,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L270-L287" + "specLocation": "_types/mapping/core.ts#L274-L291" }, { "kind": "enum", @@ -81041,7 +81085,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L177-L180" + "specLocation": "_types/mapping/core.ts#L181-L184" }, { "kind": "interface", @@ -81065,7 +81109,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L289-L291" + "specLocation": "_types/mapping/core.ts#L293-L295" }, { "kind": "interface", @@ -81106,7 +81150,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L293-L300" + "specLocation": "_types/mapping/core.ts#L297-L304" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 86c696d11c..308527fa61 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5439,6 +5439,8 @@ export interface MappingDateNanosProperty extends MappingDocValuesPropertyBase { format?: string ignore_malformed?: boolean index?: boolean + script?: Script | string + on_script_error?: MappingOnScriptError null_value?: DateTime precision_step?: integer type: 'date_nanos' @@ -5450,6 +5452,8 @@ export interface MappingDateProperty extends MappingDocValuesPropertyBase { format?: string ignore_malformed?: boolean index?: boolean + script?: Script | string + on_script_error?: MappingOnScriptError null_value?: DateTime precision_step?: integer locale?: string diff --git a/specification/_types/mapping/core.ts b/specification/_types/mapping/core.ts index aa25c6d091..c1233a18d9 100644 --- a/specification/_types/mapping/core.ts +++ b/specification/_types/mapping/core.ts @@ -69,6 +69,8 @@ export class DateProperty extends DocValuesPropertyBase { format?: string ignore_malformed?: boolean index?: boolean + script?: Script + on_script_error?: OnScriptError null_value?: DateTime precision_step?: integer locale?: string @@ -80,6 +82,8 @@ export class DateNanosProperty extends DocValuesPropertyBase { format?: string ignore_malformed?: boolean index?: boolean + script?: Script + on_script_error?: OnScriptError null_value?: DateTime precision_step?: integer type: 'date_nanos'