Skip to content

feat(java): add bridge to transformation on search #4939

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 6 commits into from
Jun 10, 2025

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Jun 5, 2025

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-3792

Changes included:

follow up of #4852 and #4898 and #4924

@shortcuts shortcuts self-assigned this Jun 5, 2025
@shortcuts shortcuts requested a review from a team as a code owner June 5, 2025 12:16
@shortcuts shortcuts requested review from morganleroi and Fluf22 June 5, 2025 12:16
@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 5, 2025

✔️ Code generated!

Name Link
🪓 Triggered by 3a6a0369a8afa9fe0c885485e23ee80314ccaa9d
🍃 Generated commit 8ddb35e4833d0ec99fb78fb41bd3bfcc47ccaa33
🌲 Generated branch generated/feat/bridge-transformation-methods
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
go 1739
javascript 1643
php 1532
csharp 1340
java 1087
python 1070
ruby 764
swift 453
scala 23

@shortcuts shortcuts requested a review from millotp June 5, 2025 12:16
@shortcuts shortcuts marked this pull request as draft June 5, 2025 12:16
@shortcuts shortcuts marked this pull request as ready for review June 5, 2025 14:42
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

nice

? clientOptions.getCustomRequester()
: defaultRequester(appId, apiKey, clientName, clientOptions, defaultHosts, connectTimeout, readTimeout, writeTimeout);
this.clientOptions = options != null ? options : new ClientOptions();
this.executor = this.clientOptions.getExecutor();
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is optional in java, I think you can omit most of them for readability

Copy link
Member Author

Choose a reason for hiding this comment

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

ah I just copied the line below, this should work then 328348a

@@ -158,7 +158,7 @@ export async function runCts(
assertValidReplaceAllObjectsFailed(languages.length - skip('dart'));
assertValidReplaceAllObjectsScopes(languages.length - skip('dart'));
assertValidWaitForApiKey(languages.length - skip('dart'));
assertPushMockValid(only('javascript') + only('go') + only('python'));
assertPushMockValid(only('javascript') + only('go') + only('python') + only('java'));
Copy link
Collaborator

Choose a reason for hiding this comment

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

love this expressiveness

{{^autoCreateClient}}{{client}} client = {{/autoCreateClient}}new {{client}}("{{parametersWithDataTypeMap.appId.value}}","{{parametersWithDataTypeMap.apiKey.value}}"{{#hasRegionalHost}}{{#parametersWithDataTypeMap.region}},"{{parametersWithDataTypeMap.region.value}}"{{/parametersWithDataTypeMap.region}}{{/hasRegionalHost}}{{#useEchoRequester}},withEchoRequester(){{/useEchoRequester}}{{#hasCustomHosts}},withCustomHosts(Arrays.asList({{#customHosts}}new Host("true".equals(System.getenv("CI")) ? "localhost" : "host.docker.internal", EnumSet.of(CallType.READ, CallType.WRITE), "http", {{port}}){{^-last}},{{/-last}}{{/customHosts}}), {{gzipEncoding}}){{/hasCustomHosts}});
Copy link
Collaborator

Choose a reason for hiding this comment

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

this adds a new line everywhere, can you put the hasTransformationRegion at the end of the first line pls ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought that for the sake of the template readability it was better to have an empty line in tests, wdyt?

@shortcuts shortcuts requested a review from millotp June 10, 2025 07:42
@shortcuts shortcuts enabled auto-merge (squash) June 10, 2025 07:56
@shortcuts shortcuts merged commit c8efa23 into main Jun 10, 2025
28 checks passed
@shortcuts shortcuts deleted the feat/bridge-transformation-methods branch June 10, 2025 08:12
algolia-bot added a commit that referenced this pull request Jun 10, 2025
algolia-bot added a commit to algolia/algoliasearch-client-java that referenced this pull request Jun 10, 2025
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.

3 participants