Improve channels search relevancy
This commit is contained in:
parent
06890d094e
commit
944afc977d
|
@ -7,6 +7,8 @@ meilisearch:
|
||||||
channels: 'peertube-index-channels-test2'
|
channels: 'peertube-index-channels-test2'
|
||||||
playlists: 'peertube-index-playlists-test2'
|
playlists: 'peertube-index-playlists-test2'
|
||||||
|
|
||||||
|
force_settings_update_at_startup: true
|
||||||
|
|
||||||
search-instance:
|
search-instance:
|
||||||
name_image: '/theme/framasoft/img/title.svg'
|
name_image: '/theme/framasoft/img/title.svg'
|
||||||
theme: 'framasoft'
|
theme: 'framasoft'
|
||||||
|
@ -30,6 +32,7 @@ instances-index:
|
||||||
- 'tube.nah.re'
|
- 'tube.nah.re'
|
||||||
- 'video.passageenseine.fr'
|
- 'video.passageenseine.fr'
|
||||||
- 'peertube.luga.at'
|
- 'peertube.luga.at'
|
||||||
|
- 'peertube.ch'
|
||||||
|
|
||||||
api:
|
api:
|
||||||
blacklist:
|
blacklist:
|
||||||
|
|
|
@ -10,7 +10,17 @@ export class ChannelIndexer extends AbstractIndexer <IndexableChannel, DBChannel
|
||||||
protected readonly filterableAttributes = [ 'url', 'host', 'videosCount', 'ownerAccount.handle', 'handle' ]
|
protected readonly filterableAttributes = [ 'url', 'host', 'videosCount', 'ownerAccount.handle', 'handle' ]
|
||||||
protected readonly sortableAttributes = SORTABLE_COLUMNS.CHANNELS_SEARCH
|
protected readonly sortableAttributes = SORTABLE_COLUMNS.CHANNELS_SEARCH
|
||||||
// Keep the order, most important first
|
// 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 () {
|
constructor () {
|
||||||
super(CONFIG.MEILISEARCH.INDEXES.CHANNELS, formatChannelForDB)
|
super(CONFIG.MEILISEARCH.INDEXES.CHANNELS, formatChannelForDB)
|
||||||
|
|
|
@ -37,12 +37,12 @@ export class VideoIndexer extends AbstractIndexer <IndexableVideo, DBVideo> {
|
||||||
]
|
]
|
||||||
|
|
||||||
protected readonly rankingRules = [
|
protected readonly rankingRules = [
|
||||||
"words",
|
'words',
|
||||||
"typo",
|
'typo',
|
||||||
"proximity",
|
'proximity',
|
||||||
"attribute",
|
'attribute',
|
||||||
"sort",
|
'sort',
|
||||||
"exactness",
|
'exactness',
|
||||||
'language:asc',
|
'language:asc',
|
||||||
'views:desc'
|
'views:desc'
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue