Skip to content

fix: guard empty FalkorDB fulltext queries#1375

Open
FUY25 wants to merge 1 commit intogetzep:mainfrom
FUY25:fix/falkordb-empty-fulltext-query-1337
Open

fix: guard empty FalkorDB fulltext queries#1375
FUY25 wants to merge 1 commit intogetzep:mainfrom
FUY25:fix/falkordb-empty-fulltext-query-1337

Conversation

@FUY25
Copy link
Copy Markdown

@FUY25 FUY25 commented Apr 4, 2026

Summary

Fixes an issue in FalkorDriver.build_fulltext_query() where a stopword-only query could produce invalid RediSearch
syntax such as (@group_id:"standups") (). This PR returns an empty string when the filtered query is empty and adds
a regression test covering that case.

Type of Change

  • Bug fix
  • New feature
  • Performance improvement
  • Documentation/Tests

Objective

This is a bug fix, so no new feature or performance objective applies.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • All existing tests pass

Locally verified with:

  • uv run pytest tests/utils/search/test_search_security.py -k stopword_only -v
  • uv run pytest tests/utils/search/test_search_security.py -v
  • uv run ruff check graphiti_core/driver/falkordb_driver.py tests/utils/search/test_search_security.py

Breaking Changes

  • This PR contains breaking changes

If this is a breaking change, describe:

  • Not applicable

Checklist

  • Code follows project style guidelines (make lint passes)
  • Self-review completed
  • Documentation updated where necessary
  • No secrets or sensitive information committed

Related Issues

Closes #1337

@danielchalef
Copy link
Copy Markdown
Member


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


YM seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

FalkorDB: empty fulltext query crashes with RediSearch syntax error when all query words are stopwords

2 participants