Skip to content

Conversation

@Milofax
Copy link

@Milofax Milofax commented Jan 25, 2026

Summary

  • Group IDs like "main" are reserved words in RediSearch and cause syntax errors when used unquoted
  • Group IDs with hyphens (e.g., "project-name") also need escaping
  • This fix wraps all group_ids in double quotes in the fulltext query

Before: (@group_id:main|project-name)
After: (@group_id:"main"|"project-name")

Problem

Intermittent errors like:

RediSearch: Syntax error at offset 20 near main

Solution

Simple 4-line fix in graphiti_core/driver/falkordb_driver.py:

escaped_group_ids = [f'"{gid}"' for gid in group_ids]
group_values = '|'.join(escaped_group_ids)

Test plan

  • Tested with group_id "main" - no more syntax errors
  • Tested with group_id "Milofax-infrastructure" - works correctly
  • Tested with multiple group_ids - proper OR query generated

🤖 Generated with Claude Code

Group IDs like "main" are reserved words in RediSearch and cause
syntax errors when used unquoted. Similarly, group IDs with hyphens
(e.g., "project-name") need escaping.

This fix wraps all group_ids in double quotes in the fulltext query:
- Before: (@group_id:main|project-name)
- After:  (@group_id:"main"|"project-name")

Fixes intermittent "RediSearch: Syntax error at offset 20 near main"
errors when searching with group_id filters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Milofax
Copy link
Author

Milofax commented Jan 25, 2026

Hi team! 👋

Just wanted to follow up on my open PRs. I have 7 PRs waiting for review:

Bug Fixes (high priority):

Features:

The CI workflows are waiting for approval to run. Would really appreciate if someone could approve them when you get a chance!

Happy to address any feedback or make changes as needed. Thanks! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant