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:
@@ -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
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
php /var/www/html/occ app:enable notes
|
||||
@@ -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
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user