Skip to content

Conversation

@david-morales
Copy link

Summary

  • Fixes RediSearch query syntax errors when entity names contain forward slashes
  • Adds / to the separator map in FalkorDB's sanitize() method

Problem

When entity names contained forward slashes (e.g., "Cruise / En route"), RediSearch queries were failing with syntax errors because the forward slash was not being sanitized. This resulted in malformed queries like:

(@group_id:\_) (Cruise | / | En | route)

Solution

Added / to the separator_map in the sanitize() method (line 324 in falkordb_driver.py), treating it like other special characters by replacing it with whitespace.

Now "Cruise / En route" is sanitized to "Cruise En route", which produces valid RediSearch queries.

Testing

Verified that:

  • "Cruise / En route" → "Cruise En route"
  • "Landing/Taxi" → "Landing Taxi"
  • Multiple slashes are handled correctly

Fixes data insertion issues when using FalkorDB backend with forward slash characters in entity names.

When entity names contained forward slashes (e.g., "Cruise / En route"),
RediSearch queries were failing with syntax errors because the forward
slash was not being sanitized.

This adds '/' to the separator map in FalkorDB's sanitize() method,
treating it like other special characters by replacing it with whitespace.

Fixes RediSearch query syntax errors when inserting data with forward slashes.
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