Add score to queried fields

This commit is contained in:
Chocobozzz 2020-09-03 09:55:25 +02:00
parent 5d9fa41eea
commit 352e80660e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ async function queryChannels (search: ChannelsSearchQuery) {
{
multi_match: {
query: search.search,
fields: [ 'name', 'displayName', 'description' ],
fields: [ 'name^5', 'displayName^3', 'description' ],
fuzziness: 'AUTO'
}
}

View File

@ -116,7 +116,7 @@ async function queryVideos (search: VideosSearchQuery) {
{
multi_match: {
query: search.search,
fields: [ 'name', 'description', 'tags' ],
fields: [ 'name^5', 'description', 'tags^3' ],
fuzziness: 'AUTO'
}
}