refactor(search): remove NLP/smart-search feature entirely (#772)
All checks were successful
CI / Unit & Component Tests (push) Successful in 3m23s
CI / OCR Service Tests (push) Successful in 24s
CI / Backend Unit Tests (push) Successful in 3m46s
CI / fail2ban Regex (push) Successful in 46s
CI / Semgrep Security Scan (push) Successful in 25s
CI / Compose Bucket Idempotency (push) Successful in 1m8s

## Summary

- Removes the NLP/smart-search feature completely — the feature was too unreliable and slow; users get better results with the regular search filters
- Deletes the entire backend `search/` package (NlSearchController, NlQueryParserService, NlpClient, NlSearchRateLimiter — 14 classes + 6 test classes)
- Deletes the `nlp-service/` Python microservice (FastAPI, rapidfuzz, DB-backed person matching)
- Removes all frontend NL search components: SmartModeToggle, SmartSearchStatus, InterpretationChipRow, DisambiguationPicker, chip-types, theme-chip-removal
- Strips smart-mode logic from SearchFilterBar and documents/+page.svelte
- Removes `SMART_SEARCH_UNAVAILABLE` / `SMART_SEARCH_RATE_LIMITED` error codes from backend, frontend types, and all three i18n files (de/en/es)
- Removes `nlp-service` container and `APP_NLP_BASE_URL` from both docker-compose files
- Removes Ollama/NLP Prometheus scrape job and Grafana dashboard
- Deletes ADRs 028 (×2), 034, 035

## Test plan

- [ ] Backend compiles: `cd backend && ./mvnw compile -q` → BUILD SUCCESS
- [ ] Frontend server tests pass: `cd frontend && npm run test -- --project=server`
- [ ] No NLP/smart-search references remain in source: `grep -r "SmartSearch\|NlSearch\|nlp-service\|SMART_SEARCH" backend/src frontend/src`
- [ ] `docker compose config` validates both compose files
- [ ] Search page loads, filter bar works, no smart-mode toggle visible

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Marcel <marcel@familienarchiv>
Reviewed-on: #772
This commit was merged in pull request #772.
This commit is contained in:
2026-06-08 10:57:00 +02:00
parent 8e63867ad8
commit d650b6c066
60 changed files with 126 additions and 4364 deletions

View File

@@ -22,33 +22,6 @@
"error_forbidden": "Sie haben keine Berechtigung für diese Aktion.",
"error_csrf_token_missing": "Sitzungsfehler. Bitte laden Sie die Seite neu.",
"error_too_many_login_attempts": "Zu viele Anmeldeversuche. Bitte versuchen Sie es später erneut.",
"error_smart_search_unavailable": "Die intelligente Suche ist momentan nicht verfügbar. Bitte nutzen Sie die normale Suche.",
"error_smart_search_rate_limited": "Sie haben die Suchfunktion zu häufig genutzt. Bitte warten Sie eine Minute.",
"smart_search_keywords_not_applied": "Schlüsselwörter konnten bei dieser Suche nicht berücksichtigt werden.",
"search_toggle_smart_label": "KI",
"search_toggle_smart_label_suffix": "-Suche",
"search_toggle_keyword_label": "Text",
"search_toggle_keyword_label_suffix": "suche",
"search_loading_nl": "Archiv wird befragt…",
"search_loading_nl_sub": "Die KI analysiert Ihre Anfrage. Das kann bis zu 15 Sekunden dauern.",
"search_error_unavailable": "Intelligente Suche nicht verfügbar",
"search_error_unavailable_body": "Die KI-Suche ist momentan nicht erreichbar. Sie können Ihre Anfrage als einfache Volltextsuche wiederholen.",
"search_switch_to_keyword": "Zur Volltextsuche wechseln",
"search_error_rate_limited": "Zu viele Anfragen",
"search_error_rate_limited_body": "Sie haben die intelligente Suche zu häufig genutzt. Bitte warten Sie eine Minute und versuchen Sie es erneut.",
"search_empty_nl": "Keine Ergebnisse",
"search_empty_retry_keyword": "Als Volltextsuche wiederholen",
"search_filter_remove_label": "Filter entfernen: {label}",
"search_chip_sender": "Absender",
"search_chip_date": "Zeitraum",
"search_chip_keyword": "Stichwort",
"search_chip_theme_prefix": "Thema",
"search_chip_directional_label": "Von {from} zu {to}, Filter entfernen",
"search_disambiguation_trigger_label": "Mehrere Personen gefunden — zum Auswählen klicken",
"search_disambiguation_cue": "(auswählen…)",
"search_disambiguation_heading": "Person auswählen",
"search_disambiguation_did_you_mean": "Meintest du {name}?",
"search_disambiguation_select_label": "{name} auswählen",
"error_validation_error": "Die Eingabe ist ungültig.",
"error_internal_error": "Ein unerwarteter Fehler ist aufgetreten.",
"nav_documents": "Dokumente",

View File

@@ -22,33 +22,6 @@
"error_forbidden": "You do not have permission for this action.",
"error_csrf_token_missing": "Session error. Please reload the page.",
"error_too_many_login_attempts": "Too many login attempts. Please try again later.",
"error_smart_search_unavailable": "The smart search is currently unavailable. Please use the regular search.",
"error_smart_search_rate_limited": "You have used the search function too frequently. Please wait a minute.",
"smart_search_keywords_not_applied": "Keywords could not be applied to this search.",
"search_toggle_smart_label": "AI",
"search_toggle_smart_label_suffix": " search",
"search_toggle_keyword_label": "Text",
"search_toggle_keyword_label_suffix": " search",
"search_loading_nl": "Querying the archive…",
"search_loading_nl_sub": "The AI is analysing your request. This can take up to 15 seconds.",
"search_error_unavailable": "Smart search unavailable",
"search_error_unavailable_body": "The AI search is currently unreachable. You can repeat your request as a plain full-text search.",
"search_switch_to_keyword": "Switch to full-text search",
"search_error_rate_limited": "Too many requests",
"search_error_rate_limited_body": "You have used the smart search too frequently. Please wait a minute and try again.",
"search_empty_nl": "No results",
"search_empty_retry_keyword": "Repeat as full-text search",
"search_filter_remove_label": "Remove filter: {label}",
"search_chip_sender": "Sender",
"search_chip_date": "Period",
"search_chip_keyword": "Keyword",
"search_chip_theme_prefix": "Topic",
"search_chip_directional_label": "From {from} to {to}, remove filter",
"search_disambiguation_trigger_label": "Several people found — click to choose",
"search_disambiguation_cue": "(choose…)",
"search_disambiguation_heading": "Choose a person",
"search_disambiguation_did_you_mean": "Did you mean {name}?",
"search_disambiguation_select_label": "Select {name}",
"error_validation_error": "The input is invalid.",
"error_internal_error": "An unexpected error occurred.",
"nav_documents": "Documents",

View File

@@ -22,33 +22,6 @@
"error_forbidden": "No tiene permiso para realizar esta acción.",
"error_csrf_token_missing": "Error de sesión. Recargue la página.",
"error_too_many_login_attempts": "Demasiados intentos. Por favor, inténtelo más tarde.",
"error_smart_search_unavailable": "La búsqueda inteligente no está disponible en este momento. Por favor, usa la búsqueda normal.",
"error_smart_search_rate_limited": "Has utilizado la función de búsqueda demasiadas veces. Por favor, espera un minuto.",
"smart_search_keywords_not_applied": "Las palabras clave no pudieron aplicarse a esta búsqueda.",
"search_toggle_smart_label": "IA",
"search_toggle_smart_label_suffix": " búsqueda",
"search_toggle_keyword_label": "Texto",
"search_toggle_keyword_label_suffix": " búsqueda",
"search_loading_nl": "Consultando el archivo…",
"search_loading_nl_sub": "La IA está analizando su solicitud. Esto puede tardar hasta 15 segundos.",
"search_error_unavailable": "Búsqueda inteligente no disponible",
"search_error_unavailable_body": "La búsqueda con IA no está disponible en este momento. Puede repetir su solicitud como una búsqueda de texto completo.",
"search_switch_to_keyword": "Cambiar a búsqueda de texto completo",
"search_error_rate_limited": "Demasiadas solicitudes",
"search_error_rate_limited_body": "Ha utilizado la búsqueda inteligente con demasiada frecuencia. Espere un minuto e inténtelo de nuevo.",
"search_empty_nl": "Sin resultados",
"search_empty_retry_keyword": "Repetir como búsqueda de texto completo",
"search_filter_remove_label": "Eliminar filtro: {label}",
"search_chip_sender": "Remitente",
"search_chip_date": "Período",
"search_chip_keyword": "Palabra clave",
"search_chip_theme_prefix": "Tema",
"search_chip_directional_label": "De {from} a {to}, eliminar filtro",
"search_disambiguation_trigger_label": "Se encontraron varias personas — haga clic para elegir",
"search_disambiguation_cue": "(elegir…)",
"search_disambiguation_heading": "Elegir una persona",
"search_disambiguation_did_you_mean": "¿Quería decir {name}?",
"search_disambiguation_select_label": "Seleccionar {name}",
"error_validation_error": "La entrada no es válida.",
"error_internal_error": "Se ha producido un error inesperado.",
"nav_documents": "Documentos",