From b2e255d97b1b3992d650cf3c6b85970bc1c3fa76 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 22 Feb 2022 10:29:15 +0100 Subject: [PATCH] Fix terms query --- server/lib/elastic-search/elastic-search-videos.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/lib/elastic-search/elastic-search-videos.ts b/server/lib/elastic-search/elastic-search-videos.ts index 14acec1..a9c994f 100644 --- a/server/lib/elastic-search/elastic-search-videos.ts +++ b/server/lib/elastic-search/elastic-search-videos.ts @@ -109,10 +109,7 @@ async function queryVideos (search: VideosSearchQuery) { if (search.tagsOneOf) { filter.push({ terms: { - 'tags.raw': { - value: search.tagsOneOf, - case_insensitive: true - } + tags: search.tagsOneOf.map(t => t.toLowerCase()) } }) }