diff --git a/config/default.yaml b/config/default.yaml index 35c4475..8e857e7 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -68,6 +68,12 @@ videos-search: # * default: use default Elastic Search match query, including fuzziness # * phrase: use Elastic Search phrase match query search-fields: + uuid: + boost: 100 + match_type: 'default' + short-uuid: + boost: 100 + match_type: 'default' name: boost: 5 match_type: 'default' @@ -117,6 +123,12 @@ playlists-search: # * default: use default Elastic Search match query, including fuzziness # * phrase: use Elastic Search phrase match query search-fields: + uuid: + boost: 100 + match_type: 'default' + short-uuid: + boost: 100 + match_type: 'default' display-name: boost: 5 match_type: 'default' diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 8132e3b..e181db1 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -45,6 +45,16 @@ const CONFIG = { ENABLED: config.get('videos-search.boost-languages.enabled') }, SEARCH_FIELDS: { + UUID: { + FIELD_NAME: 'uuid', + BOOST: config.get('videos-search.search-fields.uuid.boost'), + MATCH_TYPE: config.get('videos-search.search-fields.uuid.match_type') + }, + SHORT_UUID: { + FIELD_NAME: 'shortUUID', + BOOST: config.get('videos-search.search-fields.short-uuid.boost'), + MATCH_TYPE: config.get('videos-search.search-fields.short-uuid.match_type') + }, NAME: { FIELD_NAME: 'name', BOOST: config.get('videos-search.search-fields.name.boost'), @@ -98,6 +108,16 @@ const CONFIG = { }, PLAYLISTS_SEARCH: { SEARCH_FIELDS: { + UUID: { + FIELD_NAME: 'uuid', + BOOST: config.get('playlists-search.search-fields.uuid.boost'), + MATCH_TYPE: config.get('playlists-search.search-fields.uuid.match_type') + }, + SHORT_UUID: { + FIELD_NAME: 'shortUUID', + BOOST: config.get('playlists-search.search-fields.short-uuid.boost'), + MATCH_TYPE: config.get('playlists-search.search-fields.short-uuid.match_type') + }, DISPLAY_NAME: { FIELD_NAME: 'displayName', BOOST: config.get('playlists-search.search-fields.display-name.boost'),