fix: Limit search results to notes with score > 0.5

Add hooks to docker-compose rather than in CICD step
This commit is contained in:
Chris Coutinho
2025-05-25 10:48:59 +02:00
parent d4966fc925
commit 8147f237cd
4 changed files with 5 additions and 5 deletions
-4
View File
@@ -41,10 +41,6 @@ jobs:
done
echo "Service is ready (returned 401)."
- name: Install notes app
run: |
docker compose exec app php occ app:enable notes
# Add subsequent steps here, e.g., running tests
- name: Run tests
env:
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
php /var/www/html/occ app:enable notes
+1
View File
@@ -34,6 +34,7 @@ services:
- db
volumes:
- nextcloud:/var/www/html
- ./app-hooks/post-installation:/docker-entrypoint-hooks.d/post-installation:ro
environment:
- NEXTCLOUD_TRUSTED_DOMAINS=app
- NEXTCLOUD_ADMIN_USER=admin
+1 -1
View File
@@ -211,7 +211,7 @@ class NextcloudClient:
score = self.calculate_score(query_tokens, title_tokens, content_tokens)
# Only include notes with a non-zero score
if score > 0:
if score >= 0.5:
search_results.append({
"id": note.get("id"),
"title": note.get("title"),