Skip to content

Commit

Permalink
fix(clients): use the correct host for search (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3787

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Sep 20, 2024
1 parent cd697b2 commit 465be15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ private static List<Host> getDefaultHosts(String appId) {
hosts.add(new Host(appId + ".algolia.net", EnumSet.of(CallType.WRITE)));

List<Host> commonHosts = new ArrayList<>();
commonHosts.add(new Host(appId + "-1.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-2.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-3.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-1.algolianet.com", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-2.algolianet.com", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-3.algolianet.com", EnumSet.of(CallType.READ, CallType.WRITE)));

Collections.shuffle(commonHosts, new Random());

Expand Down
6 changes: 3 additions & 3 deletions algoliasearch/src/main/java/com/algolia/api/SearchClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ private static List<Host> getDefaultHosts(String appId) {
hosts.add(new Host(appId + ".algolia.net", EnumSet.of(CallType.WRITE)));

List<Host> commonHosts = new ArrayList<>();
commonHosts.add(new Host(appId + "-1.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-2.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-3.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-1.algolianet.com", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-2.algolianet.com", EnumSet.of(CallType.READ, CallType.WRITE)));
commonHosts.add(new Host(appId + "-3.algolianet.com", EnumSet.of(CallType.READ, CallType.WRITE)));

Collections.shuffle(commonHosts, new Random());

Expand Down

0 comments on commit 465be15

Please sign in to comment.