Skip to content

Add Query Builder for RediSearch commands #3436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ofekshenawa
Copy link
Collaborator

A query API builder pattern for RediSearch commands in go-redis, providing a more intuitive and type safe way to construct complex search queries and operations.

Features Added

  • SearchBuilder : FT.SEARCH queries
  • AggregateBuilder: FT.AGGREGATE queries
  • ExplainBuilder: Query explanation with FT.EXPLAIN
  • SearchInfoBuilder: Index information retrieval
  • SpellCheckBuilder: Spell checking functionality
  • TagValsBuilder: Tag value enumeration
  • SynUpdateBuilder: Synonym management
  • CursorBuilder: Cursor-based result pagination
  • DictBuilder: Dictionary management
  • AliasBuilder: Index alias operations
  • DropIndexBuilder: Index deletion with options

Implementation Details

  • Builder pattern with method chaining
  • Lazy evaluation: commands execute only when Run() is called
  • Backward compatible: existing FT.* methods unchanged

* Add search module builders and tests

* Add tests
@ofekshenawa ofekshenawa marked this pull request as ready for review July 16, 2025 20:17
@ndyakov
Copy link
Member

ndyakov commented Jul 21, 2025

Hey @ofekshenawa, thank you for this contribution. @htemelski-redis and I will review it soon.

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.

2 participants