Fix case sensitive tag search

This commit is contained in:
Chocobozzz 2022-02-22 10:14:32 +01:00
parent 9922da42ed
commit 927067139c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 8 additions and 2 deletions

View File

@ -109,7 +109,10 @@ async function queryVideos (search: VideosSearchQuery) {
if (search.tagsOneOf) { if (search.tagsOneOf) {
filter.push({ filter.push({
terms: { terms: {
tags: search.tagsOneOf 'tags.raw': {
value: search.tagsOneOf,
case_insensitive: true
}
} }
}) })
} }
@ -118,7 +121,10 @@ async function queryVideos (search: VideosSearchQuery) {
for (const t of search.tagsAllOf) { for (const t of search.tagsAllOf) {
filter.push({ filter.push({
term: { term: {
tags: t 'tags.raw': {
value: t,
case_insensitive: true
}
} }
}) })
} }