fix: brain search — Meilisearch settings use PATCH not PUT
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user