diff --git a/conf/app.src b/conf/app.src index 769239b..4b32973 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/framasoft/peertube/search-index/-/archive/b44e850fa1604cebac19eb822e9d555f673085b0/search-index-b44e850fa1604cebac19eb822e9d555f673085b0.tar.gz -SOURCE_SUM=7a68fd70aeaac05d06fbbb3c8cf7a375e9d2e112235e4af6857630380e114b18 +SOURCE_URL=https://framagit.org/framasoft/peertube/search-index/-/archive/36a36379b469982e6b2fc219825283e2470135e7/search-index-36a36379b469982e6b2fc219825283e2470135e7.tar.gz +SOURCE_SUM=d5f92138c38642cb1cf559f2260652203aa38cfd03c5811c49e9299d1cdfe3ef SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/default.yaml b/conf/default.yaml index cdc652e..6b3525c 100644 --- a/conf/default.yaml +++ b/conf/default.yaml @@ -8,11 +8,20 @@ webserver: port: __PORT__ elastic-search: + # https or http + http: 'http' + auth: + username: null + password: null + ssl: + # Specificy a custom CA + ca: null hostname: 'localhost' port: 9200 indexes: videos: 'peertube-index-videos' channels: 'peertube-index-channels' + playlists: 'peertube-index-playlists' log: level: 'debug' # debug/info/warning/error @@ -50,34 +59,82 @@ videos-search: boost-languages: enabled: true - # Add ability to change videos search fields boost value + # Add ability to change videos search fields boost and match value # See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information + # # If boost == 0, the field will not be part of the search + # + # match_type could be 'default' or 'phrase' + # * 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' description: boost: 1 + match_type: 'phrase' tags: - boost: 3 + boost: 2 + match_type: 'default' account-display-name: boost: 2 + match_type: 'default' channel-display-name: boost: 2 + match_type: 'default' channels-search: - # Add ability to change channels search fields boost value + # Add ability to change channels search fields boost and match value # See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information + # # If boost == 0, the field will not be part of the search + # + # match_type could be 'default' or 'phrase' + # * default: use default Elastic Search match query, including fuzziness + # * phrase: use Elastic Search phrase match query search-fields: name: boost: 5 + match_type: 'default' description: boost: 1 + match_type: 'phrase' display-name: boost: 3 + match_type: 'default' account-display-name: boost: 2 + match_type: 'default' + +playlists-search: + # Add ability to change playlists search fields boost and match value + # See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information + # + # If boost == 0, the field will not be part of the search + # + # match_type could be 'default' or 'phrase' + # * 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' + description: + boost: 1 + match_type: 'phrase' api: # Blacklist hosts that will not be returned by the search API diff --git a/conf/nginx.conf b/conf/nginx.conf index 6dcc899..41bddd1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + alias __FINALPATH__/; proxy_pass http://localhost:__PORT__; proxy_set_header X-Real-IP $remote_addr; diff --git a/manifest.json b/manifest.json index 82a822e..c63fb46 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Search engine for PeerTube videos and channels", "fr": "Moteur de recherche de vidéos et chaînes PeerTube" }, - "version": "0.0.1.2022.06.03~ynh1", + "version": "0.0.1.2023.08.08~ynh1", "url": "https://search.joinpeertube.org/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 7656999..3075898 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_dependencies="git" extra_pkg_dependencies="elasticsearch-oss" -NODEJS_VERSION=14 +NODEJS_VERSION=16 REPOSITORY="https://framagit.org/framasoft/peertube/search-index"