From 3f3376cfea8a4355229d4fb7d3a69a299de8cba4 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Wed, 25 Oct 2023 10:13:12 +0400 Subject: [PATCH] Remove unreferenced subfields in indices (#3162) --- .../ingestion_server/es_mapping.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/ingestion_server/ingestion_server/es_mapping.py b/ingestion_server/ingestion_server/es_mapping.py index c70e4c1a4fd..d7ec3272f7b 100644 --- a/ingestion_server/ingestion_server/es_mapping.py +++ b/ingestion_server/ingestion_server/es_mapping.py @@ -66,23 +66,11 @@ def index_settings(media_type: MediaType): "created_on": {"type": "date"}, "mature": {"type": "boolean"}, # Keyword fields - "identifier": { - # TODO: Remove subfield when API is updated - "fields": {"keyword": {"type": "keyword"}}, - "type": "keyword", - }, + "identifier": {"type": "keyword"}, "extension": {"type": "keyword"}, - "license": { - # TODO: Remove subfield when API is updated - "fields": {"keyword": {"type": "keyword"}}, - "type": "keyword", - }, + "license": {"type": "keyword"}, "provider": {"type": "keyword"}, - "source": { - # TODO: Remove subfield when API is updated - "fields": {"keyword": {"type": "keyword"}}, - "type": "keyword", - }, + "source": {"type": "keyword"}, "filetype": {"type": "keyword"}, "category": {"type": "keyword"}, # Text-based fields