From 85a075260d3d550efb9d517e5133f4b5d3ea6477 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Wed, 1 Apr 2026 19:48:27 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20brain=20search=20=E2=80=94=20Meilisearch?= =?UTF-8?q?=20settings=20use=20PATCH=20not=20PUT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings were failing with 405 (PUT not supported in Meilisearch v1.12). Changed to PATCH. Filterable/searchable attributes now applied. Keyword search working: wedding, yusuf, insurance, airport all return results. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/lib/pages/brain/AtelierBrainPage.svelte | 12 ++++++------ services/brain/app/search/engine.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend-v2/src/lib/pages/brain/AtelierBrainPage.svelte b/frontend-v2/src/lib/pages/brain/AtelierBrainPage.svelte index 01bb3c1..ca27fa8 100644 --- a/frontend-v2/src/lib/pages/brain/AtelierBrainPage.svelte +++ b/frontend-v2/src/lib/pages/brain/AtelierBrainPage.svelte @@ -920,10 +920,10 @@ .viewer-layout { display: grid; - grid-template-columns: 1fr 300px; - width: 90vw; - max-width: 1100px; - height: 80vh; + grid-template-columns: 1fr 440px; + width: 94vw; + max-width: 1300px; + height: 85vh; border-radius: 24px; overflow: hidden; box-shadow: 0 32px 80px rgba(18,13,10,0.3); @@ -961,11 +961,11 @@ .viewer-sidebar { background: linear-gradient(180deg, #f8f1e8 0%, #f3eadc 100%); border-left: 1px solid rgba(35,26,17,0.08); - padding: 22px; + padding: 28px; overflow-y: auto; display: flex; flex-direction: column; - gap: 14px; + gap: 18px; } .viewer-sidebar-header { diff --git a/services/brain/app/search/engine.py b/services/brain/app/search/engine.py index 13e70b4..de4ac8d 100644 --- a/services/brain/app/search/engine.py +++ b/services/brain/app/search/engine.py @@ -37,8 +37,8 @@ async def _meili_request(method: str, path: str, json_data: dict = None) -> dict async def ensure_meili_index(): """Create the Meilisearch index if it doesn't exist.""" await _meili_request("POST", "indexes", {"uid": MEILI_INDEX, "primaryKey": "id"}) - # Set filterable attributes - await _meili_request("PUT", f"indexes/{MEILI_INDEX}/settings", { + # Set filterable attributes (PATCH for Meilisearch v1.x) + await _meili_request("PATCH", f"indexes/{MEILI_INDEX}/settings", { "filterableAttributes": ["user_id", "folder", "tags", "type", "processing_status"], "searchableAttributes": ["title", "extracted_text", "summary", "url"], "sortableAttributes": ["created_at"],