refac: search notes db query

This commit is contained in:
Timothy Jaeryang Baek
2025-12-10 21:06:53 -05:00
parent 68219d84a9
commit 3ed1df2e53

View File

@@ -255,7 +255,9 @@ class NoteTable:
query = query.filter( query = query.filter(
or_( or_(
Note.title.ilike(f"%{query_key}%"), Note.title.ilike(f"%{query_key}%"),
Note.data["content"]["md"].ilike(f"%{query_key}%"), cast(Note.data["content"]["md"], Text).ilike(
f"%{query_key}%"
),
) )
) )