From 668c7000fb930174a2f425bad67d9ea17a386e75 Mon Sep 17 00:00:00 2001 From: LightJack05 <66321084+LightJack05@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:59:04 +0100 Subject: [PATCH] Update search weights for search fields --- import_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import_db.sh b/import_db.sh index c150641..c852afd 100755 --- a/import_db.sh +++ b/import_db.sh @@ -3,4 +3,4 @@ # We use the env vars provided in compose to authenticate mongorestore --username "$MONGO_INITDB_ROOT_USERNAME" --password "$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase admin --archive=openfoodfacts-mongodbdump.gz --gzip mongosh --username "$MONGO_INITDB_ROOT_USERNAME" --password "$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase admin "mongodb://localhost:27017/off" --eval 'db.products.dropIndexes()' -mongosh --username "$MONGO_INITDB_ROOT_USERNAME" --password "$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase admin "mongodb://localhost:27017/off" --eval 'db.products.createIndex({ _keywords: "text", product_name: "text" }, { name: "TextSearchIndex" });' +mongosh --username "$MONGO_INITDB_ROOT_USERNAME" --password "$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase admin "mongodb://localhost:27017/off" --eval 'db.products.createIndex({ _keywords: "text", product_name: "text" }, { weights: { product_name: 5, _keywords: 3}, name: "TextSearchIndex" });'