diff --git a/backend/open_webui/models/notes.py b/backend/open_webui/models/notes.py index 2ca932ff7f..cfeddf4a8c 100644 --- a/backend/open_webui/models/notes.py +++ b/backend/open_webui/models/notes.py @@ -255,7 +255,9 @@ class NoteTable: query = query.filter( or_( Note.title.ilike(f"%{query_key}%"), - Note.data["content"]["md"].ilike(f"%{query_key}%"), + cast(Note.data["content"]["md"], Text).ilike( + f"%{query_key}%" + ), ) )