Skip to content
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

Allow setting default dialect for search module #3452

Merged
merged 3 commits into from
Jun 8, 2023

Conversation

sazzad16
Copy link
Collaborator

@sazzad16 sazzad16 commented Jun 1, 2023

Resolves #3447

@sazzad16 sazzad16 added breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. experimental labels Jun 1, 2023
@sazzad16 sazzad16 added this to the 5.0.0 milestone Jun 1, 2023
@sazzad16 sazzad16 requested a review from uglide June 1, 2023 15:05
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 83.11% and no project coverage change.

Comparison is base (ef21a05) 71.32% compared to head (c62242a) 71.33%.

❗ Current head c62242a differs from pull request most recent head 89e6948. Consider uploading reports for the commit 89e6948 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3452   +/-   ##
=========================================
  Coverage     71.32%   71.33%           
- Complexity     4739     4750   +11     
=========================================
  Files           274      274           
  Lines         14697    14716   +19     
  Branches        991      992    +1     
=========================================
+ Hits          10483    10497   +14     
- Misses         3785     3786    +1     
- Partials        429      433    +4     
Impacted Files Coverage Δ
...redis/clients/jedis/search/FTSpellCheckParams.java 91.30% <33.33%> (-8.70%) ⬇️
...ava/redis/clients/jedis/search/FTSearchParams.java 67.47% <66.66%> (-0.02%) ⬇️
.../main/java/redis/clients/jedis/CommandObjects.java 85.87% <83.33%> (-0.02%) ⬇️
.../clients/jedis/search/aggr/AggregationBuilder.java 85.39% <84.78%> (-0.66%) ⬇️
...rc/main/java/redis/clients/jedis/UnifiedJedis.java 74.63% <100.00%> (+0.04%) ⬆️
...rc/main/java/redis/clients/jedis/search/Query.java 78.69% <100.00%> (+0.18%) ⬆️
...lients/jedis/search/aggr/FtAggregateIteration.java 90.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@uglide
Copy link
Contributor

uglide commented Jun 8, 2023

@sazzad16 Could you add the same for FT.AGGREGATE? I've updated the issue description.

@sazzad16 sazzad16 changed the title Allow setting default search dialect Allow setting default dialect for search module Jun 8, 2023
@@ -4168,6 +4172,11 @@ public void setJsonObjectMapper(JsonObjectMapper jsonObjectMapper) {
this.jsonObjectMapper = jsonObjectMapper;
}

public void setDefaultSearchDialect(int dialect) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue says This configuration option should be optional. If it is not specified, the client should fall back to the current behavior.

Raising this argument isn't that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Firstly, users would be using the one in UnifiedJedis. I guess we're concerned about that and so check my answer in test file.

@Override
public void setUp() {
super.setUp();
client.setDefaultSearchDialect(DEFAULT_DIALECT);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@chayim Here, I'm setting a default dialect for client apis. This is set once and used in all the following tests.
More importantly, assuming you're conerned about thsi, IT IS OPTIONAL. For example, this configuration is NOT SET in other search test files.

@sazzad16 sazzad16 merged commit 9383cd4 into redis:master Jun 8, 2023
@sazzad16 sazzad16 deleted the rs-aggr-dialect branch June 8, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. experimental
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RediSearch Dialect Version Configuration Option
4 participants