diff --git a/README.md b/README.md
index f73e16a..0c870d4 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# PeerTube search-index for YunoHost
-[](https://dash.yunohost.org/appci/app/peertube-search-index)  
+[](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/)  
[](https://install-app.yunohost.org/?app=peertube-search-index)
@@ -19,7 +19,7 @@ It shall NOT be edited by hand.
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
-**Shipped version:** 0.0.1.2023.08.08~ynh2
+**Shipped version:** 1.0.0~ynh1
**Demo:**
diff --git a/README_es.md b/README_es.md
index 10ab8f2..8263be5 100644
--- a/README_es.md
+++ b/README_es.md
@@ -5,7 +5,7 @@ No se debe editar a mano.
# PeerTube search-index para Yunohost
-[](https://dash.yunohost.org/appci/app/peertube-search-index)  
+[](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/)  
[](https://install-app.yunohost.org/?app=peertube-search-index)
@@ -19,7 +19,7 @@ No se debe editar a mano.
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
-**Versión actual:** 0.0.1.2023.08.08~ynh2
+**Versión actual:** 1.0.0~ynh1
**Demo:**
diff --git a/README_eu.md b/README_eu.md
index 278968d..da0056e 100644
--- a/README_eu.md
+++ b/README_eu.md
@@ -5,7 +5,7 @@ EZ editatu eskuz.
# PeerTube search-index YunoHost-erako
-[](https://dash.yunohost.org/appci/app/peertube-search-index)  
+[](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/)  
[](https://install-app.yunohost.org/?app=peertube-search-index)
@@ -19,7 +19,7 @@ EZ editatu eskuz.
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
-**Paketatutako bertsioa:** 0.0.1.2023.08.08~ynh2
+**Paketatutako bertsioa:** 1.0.0~ynh1
**Demoa:**
diff --git a/README_fr.md b/README_fr.md
index 16c237e..a590aed 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# PeerTube search-index pour YunoHost
-[](https://dash.yunohost.org/appci/app/peertube-search-index)  
+[](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/)  
[](https://install-app.yunohost.org/?app=peertube-search-index)
@@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
-**Version incluse :** 0.0.1.2023.08.08~ynh2
+**Version incluse :** 1.0.0~ynh1
**Démo :**
diff --git a/README_gl.md b/README_gl.md
index 9e2ebf3..2f5e02d 100644
--- a/README_gl.md
+++ b/README_gl.md
@@ -5,7 +5,7 @@ NON debe editarse manualmente.
# PeerTube search-index para YunoHost
-[](https://dash.yunohost.org/appci/app/peertube-search-index)  
+[](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/)  
[](https://install-app.yunohost.org/?app=peertube-search-index)
@@ -19,7 +19,7 @@ NON debe editarse manualmente.
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
-**Versión proporcionada:** 0.0.1.2023.08.08~ynh2
+**Versión proporcionada:** 1.0.0~ynh1
**Demo:**
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
index 9316395..eaaadb6 100644
--- a/README_zh_Hans.md
+++ b/README_zh_Hans.md
@@ -5,7 +5,7 @@
# YunoHost 上的 PeerTube search-index
-[](https://dash.yunohost.org/appci/app/peertube-search-index)  
+[](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/)  
[](https://install-app.yunohost.org/?app=peertube-search-index)
@@ -19,7 +19,7 @@
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
-**分发版本:** 0.0.1.2023.08.08~ynh2
+**分发版本:** 1.0.0~ynh1
**演示:**
diff --git a/conf/default.yaml b/conf/default.yaml
index 6b3525c..d7a4a9e 100644
--- a/conf/default.yaml
+++ b/conf/default.yaml
@@ -7,17 +7,11 @@ webserver:
hostname: 'localhost'
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
+meilisearch:
+ host: 'http://127.0.0.1:7700'
+
+ api_key: null
+
indexes:
videos: 'peertube-index-videos'
channels: 'peertube-index-channels'
@@ -54,91 +48,16 @@ instances-index:
enabled: false
hosts: null
-videos-search:
- # Allow client to send browser language to boost results score that are in these languages
- boost-languages:
- enabled: true
-
- # 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: 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 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
blacklist:
enabled: false
# Array of hosts
hosts: null
+
+indexer:
+ # How many hosts in parallel to index
+ host_concurrency: 10
+
+ # How much time to wait before bulk indexing in Meilisearch data
+ bulk_indexation_interval_ms: 10000
diff --git a/conf/systemd.service b/conf/systemd.service
index d90cd4f..8d4ff4f 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -6,10 +6,10 @@ After=network.target
Type=simple
Environment=NODE_ENV=production
Environment="__YNH_NODE_LOAD_PATH__"
-Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/sources/config
+Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/config
User=__APP__
Group=__APP__
-ExecStart=__YNH_NPM__ start
+ExecStart=__YNH_NODE__ __INSTALL_DIR__/sources/dist/server.js
WorkingDirectory=__INSTALL_DIR__/sources/
StandardOutput=syslog
StandardError=syslog
diff --git a/manifest.toml b/manifest.toml
index 7f014e1..64afdae 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -7,7 +7,7 @@ name = "PeerTube search-index"
description.en = "Search engine for PeerTube videos and channels"
description.fr = "Moteur de recherche de vidéos et chaînes PeerTube"
-version = "0.0.1.2023.08.08~ynh2"
+version = "1.0.0~ynh1"
maintainers = ["yalh76"]
@@ -39,8 +39,8 @@ ram.runtime = "2000M"
[resources]
[resources.sources.main]
- url = "https://framagit.org/framasoft/peertube/search-index/-/archive/316adda0db184cb36f0645a60dc8f6a1611ecd28/search-index-316adda0db184cb36f0645a60dc8f6a1611ecd28.tar.gz"
- sha256 = "d5f92138c38642cb1cf559f2260652203aa38cfd03c5811c49e9299d1cdfe3ef"
+ url = "https://framagit.org/framasoft/peertube/search-index/-/archive/v1.0.0/search-index-v1.0.0.tar.bz2"
+ sha256 = "ac45e299480cd87e824fcf9fb5f48446985c58079e8c8d10d34f3cc3492b3267"
# Unused because of submodules...
prefetch = false
autoupdate.strategy = "latest_gitlab_tag"
@@ -58,10 +58,10 @@ ram.runtime = "2000M"
[resources.apt]
packages = ["git", ]
- [resources.apt.extras.elastic]
- repo = "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main"
- key = "https://artifacts.elastic.co/GPG-KEY-elasticsearch"
- packages = ["elasticsearch-oss"]
+ [resources.apt.extras.meilisearch]
+ repo = "deb https://apt.fury.io/meilisearch/ /"
+ key = ""
+ packages = ["meilisearch"]
[resources.apt.extras.yarn]
repo = "deb https://dl.yarnpkg.com/debian/ stable main"
diff --git a/scripts/install b/scripts/install
index 618da95..b3d0302 100644
--- a/scripts/install
+++ b/scripts/install
@@ -17,15 +17,15 @@ ynh_script_progression --message="Installing NodeJS..."
ynh_install_nodejs --nodejs_version="$NODEJS_VERSION"
#=================================================
-# START ELASTICSEARCH
+# START MEILISEARCH
#=================================================
-ynh_script_progression --message="Starting elasticsearch..."
+ynh_script_progression --message="Starting meilisearch..."
-# Fix permissions in case of remove/reinstall
-chown -R elasticsearch:elasticsearch /var/lib/elasticsearch
+# # Fix permissions in case of remove/reinstall
+# chown -R meilisearch:meilisearch /var/lib/meilisearch
-systemctl enable elasticsearch.service --quiet
-systemctl start elasticsearch.service
+# systemctl enable meilisearch.service --quiet
+# systemctl start meilisearch.service
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@@ -53,10 +53,10 @@ popd
#=================================================
ynh_script_progression --message="Adding a config file..."
-ynh_add_config --template="default.yaml" --destination="$install_dir/sources/config/production.yaml"
+ynh_add_config --template="default.yaml" --destination="$install_dir/config/production.yaml"
-chmod 400 "$install_dir/sources/config/production.yaml"
-chown "$app:$app" "$install_dir/sources/config/production.yaml"
+chmod 400 "$install_dir/config/production.yaml"
+chown "$app:$app" "$install_dir/config/production.yaml"
#=================================================
# SYSTEM CONFIGURATION
diff --git a/scripts/upgrade b/scripts/upgrade
index 44cc1aa..0fa8b06 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -74,10 +74,10 @@ popd
#=================================================
ynh_script_progression --message="Updating a config file..."
-ynh_add_config --template="default.yaml" --destination="$install_dir/sources/config/production.yaml"
+ynh_add_config --template="default.yaml" --destination="$install_dir/config/production.yaml"
-chmod 400 "$install_dir/sources/config/production.yaml"
-chown "$app:$app" "$install_dir/sources/config/production.yaml"
+chmod 400 "$install_dir/config/production.yaml"
+chown "$app:$app" "$install_dir/config/production.yaml"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS