Improve channels search relevancy
This commit is contained in:
parent
06890d094e
commit
944afc977d
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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'
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue