Add no linguistic content to languages boost

This commit is contained in:
Chocobozzz 2024-01-05 07:22:37 +01:00
parent 65295a804a
commit 477fd984cf
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 1 deletions

View File

@ -52,6 +52,9 @@ export async function queryVideos (search: VideosSearchQuery) {
logger.debug({ filter }, 'Will query Meilisearch for videos.') logger.debug({ filter }, 'Will query Meilisearch for videos.')
const boostLanguages = search.boostLanguages || []
boostLanguages.push('zxx') // No linguistic content
const result = await client.index(CONFIG.MEILISEARCH.INDEXES.VIDEOS).search(search.search, { const result = await client.index(CONFIG.MEILISEARCH.INDEXES.VIDEOS).search(search.search, {
offset: search.start, offset: search.start,
limit: search.count, limit: search.count,
@ -60,7 +63,7 @@ export async function queryVideos (search: VideosSearchQuery) {
filter: [ filter: [
...filter, ...filter,
`language.id IN ${buildInValuesArray(search.boostLanguages)} OR language.id IS NULL` `language.id IN ${buildInValuesArray(boostLanguages)} OR language.id IS NULL`
] ]
}) })