Improve channels search relevancy

This commit is contained in:
Chocobozzz 2024-01-15 11:23:14 +01:00
parent 06890d094e
commit 944afc977d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 20 additions and 7 deletions

View File

@ -7,6 +7,8 @@ meilisearch:
channels: 'peertube-index-channels-test2'
playlists: 'peertube-index-playlists-test2'
force_settings_update_at_startup: true
search-instance:
name_image: '/theme/framasoft/img/title.svg'
theme: 'framasoft'
@ -30,6 +32,7 @@ instances-index:
- 'tube.nah.re'
- 'video.passageenseine.fr'
- 'peertube.luga.at'
- 'peertube.ch'
api:
blacklist:

View File

@ -10,7 +10,17 @@ export class ChannelIndexer extends AbstractIndexer <IndexableChannel, DBChannel
protected readonly filterableAttributes = [ 'url', 'host', 'videosCount', 'ownerAccount.handle', 'handle' ]
protected readonly sortableAttributes = SORTABLE_COLUMNS.CHANNELS_SEARCH
// Keep the order, most important first
protected readonly searchableAttributes = [ 'name', 'displayName', 'ownerAccount.displayName', 'description' ]
protected readonly searchableAttributes = [ 'name', 'displayName', 'ownerAccount.name', 'ownerAccount.displayName', 'description' ]
protected readonly rankingRules = [
'words',
'typo',
'proximity',
'attribute',
'sort',
'exactness',
'followersCount:desc'
]
constructor () {
super(CONFIG.MEILISEARCH.INDEXES.CHANNELS, formatChannelForDB)

View File

@ -37,12 +37,12 @@ export class VideoIndexer extends AbstractIndexer <IndexableVideo, DBVideo> {
]
protected readonly rankingRules = [
"words",
"typo",
"proximity",
"attribute",
"sort",
"exactness",
'words',
'typo',
'proximity',
'attribute',
'sort',
'exactness',
'language:asc',
'views:desc'
]