From e10c825f75a159094abc94076d5eb4b789538139 Mon Sep 17 00:00:00 2001 From: mirdono Date: Tue, 21 Jan 2025 20:35:17 +0100 Subject: [PATCH] fix: index municipality names as keywords instead of regular text Index municipality names as keywords instead of as plain text. This prevents them from being split at word separators. Thereby avoiding that searches for a municipality name, as used by the frontend's municipality filter, return organisations whose municipality is a partial match. For example, previously the results when searching for "Puurs" also included the organisations located in "Sint-Amands-Puurs". The latter was tokenized into three terms, therefore also matching plain "Puurs". By treating the municipality name as keyword this split non longer happens. --- config/search/config.json | 10 +++++----- config/search/dev/config.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/search/config.json b/config/search/config.json index 643458d..3a5d67e 100644 --- a/config/search/config.json +++ b/config/search/config.json @@ -223,7 +223,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -385,7 +385,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -540,7 +540,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -727,7 +727,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -880,7 +880,7 @@ } }, "municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", diff --git a/config/search/dev/config.json b/config/search/dev/config.json index bdb3394..ab1902c 100644 --- a/config/search/dev/config.json +++ b/config/search/dev/config.json @@ -195,7 +195,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -357,7 +357,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -512,7 +512,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -700,7 +700,7 @@ } }, "organization_municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword", @@ -853,7 +853,7 @@ } }, "municipality": { - "type": "text", + "type": "keyword", "fields": { "field": { "type": "keyword",