Skip to content

Commit 3b6578e

Browse files
committed
fix textual filter bug and resolve conversation
1 parent 70905da commit 3b6578e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/memos/graph_dbs/polardb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,11 +3654,11 @@ def build_filter_condition(condition_dict: dict) -> str:
36543654
if isinstance(op_value, str):
36553655
escaped_value = escape_sql_string(op_value)
36563656
condition_parts.append(
3657-
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype) @> '\"{escaped_value}\"'::agtype"
3657+
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype]) @> '\"{escaped_value}\"'::agtype"
36583658
)
36593659
else:
36603660
condition_parts.append(
3661-
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype) @> {op_value}::agtype"
3661+
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype]) @> {op_value}::agtype"
36623662
)
36633663
else:
36643664
# Direct property access
@@ -3684,11 +3684,11 @@ def build_filter_condition(condition_dict: dict) -> str:
36843684
.replace("_", "\\_")
36853685
)
36863686
condition_parts.append(
3687-
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype)::text LIKE '%{escaped_value}%'"
3687+
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype])::text LIKE '%{escaped_value}%'"
36883688
)
36893689
else:
36903690
condition_parts.append(
3691-
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype)::text LIKE '%{op_value}%'"
3691+
f"ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, '\"info\"'::ag_catalog.agtype, '\"{info_field}\"'::ag_catalog.agtype])::text LIKE '%{op_value}%'"
36923692
)
36933693
else:
36943694
# Direct property access

src/memos/memories/textual/preference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def search(
8787
Returns:
8888
list[TextualMemoryItem]: List of matching memories.
8989
"""
90-
print(f"search_filter for preference memory: {search_filter}")
90+
logger.info(f"search_filter for preference memory: {search_filter}")
9191
return self.retriever.retrieve(query, top_k, info, search_filter)
9292

9393
def load(self, dir: str) -> None:

0 commit comments

Comments
 (0)