From 6a2abdb5888dde7dd10586416c7621e93e1548f2 Mon Sep 17 00:00:00 2001 From: Petr Jasek Date: Mon, 12 Feb 2024 15:28:06 +0100 Subject: [PATCH] add related_items to events schema SDBELGA-767 --- server/planning/events/events_schema.py | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/server/planning/events/events_schema.py b/server/planning/events/events_schema.py index 56aa6e70b..cf01da87a 100644 --- a/server/planning/events/events_schema.py +++ b/server/planning/events/events_schema.py @@ -370,4 +370,31 @@ }, }, }, -} # end events_schema + "related_items": { + "type": "list", + "required": False, + "schema": { + "type": "dict", + "schema": { + "guid": {"type": "string", "required": True}, + "type": {"type": "string"}, + "state": {"type": "string"}, + "version": {"type": "string"}, + "headline": {"type": "string"}, + "slugline": {"type": "string"}, + "versioncreated": metadata_schema["versioncreated"], + "source": {"type": "string"}, + "search_provider": {"type": "string"}, + "pubstatus": {"type": "string"}, + "language": {"type": "string"}, + }, + }, + "mapping": { + "type": "object", + "dynamic": False, + "properties": { + "guid": not_analyzed, # allow searching events by item id + }, + }, + }, +} # end events_schema: