Skip to content

Set DIALECT 2 as default configurable dialect version #355

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

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

atakavci
Copy link
Collaborator

This change basically sets DIALECT 2 as the default dialect version on client side. Where DIALECT is relevant, each search/query will be using this default value unless it is configured otherwise.

Configuration could be changed explicitly at IDatabase level or at Query/AggregationRequest level.
A sample code showing how to change it using different constructs.

        // setting DIALECT at database level
        IDatabase db = ConnectionMultiplexer.Connect("localhost:6379").GetDatabase();
        SearchCommands ft = db.FT();
        ft.SetDefaultDialect(4);
        SearchResult result = ft.Search(index, new Query("@version:[123]"));

        // setting DIALECt at query level
        IDatabase db = ConnectionMultiplexer.Connect("localhost:6379").GetDatabase();
        ISearchCommands ft = db.FT();
        SearchResult result = ft.Search(index, new Query("@version:[123]").Dialect(4));

@atakavci atakavci added breakingchange API or breaking change maintenance labels Dec 24, 2024
Copy link
Contributor

@uglide uglide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@atakavci atakavci merged commit e152ef2 into redis:master Dec 30, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakingchange API or breaking change maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants