This repository was archived by the owner on Jan 31, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/com/algolia/search/saas
offline/java/com/algolia/search/saas Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ public Request getSettingsAsync(@NonNull CompletionHandler completionHandler) {
502
502
return getClient ().new AsyncTaskRequest (completionHandler ) {
503
503
@ NonNull
504
504
@ Override JSONObject run () throws AlgoliaException {
505
- return getSettings ();
505
+ return getSettings (2 );
506
506
}
507
507
}.start ();
508
508
}
@@ -1021,8 +1021,8 @@ protected JSONObject waitTask(String taskID) throws AlgoliaException {
1021
1021
*
1022
1022
* @throws AlgoliaException
1023
1023
*/
1024
- protected JSONObject getSettings () throws AlgoliaException {
1025
- return client .getRequest ("/1/indexes/" + encodedIndexName + "/settings" , false );
1024
+ protected JSONObject getSettings (int formatVersion ) throws AlgoliaException {
1025
+ return client .getRequest ("/1/indexes/" + encodedIndexName + "/settings?getVersion=" + formatVersion , false );
1026
1026
}
1027
1027
1028
1028
/**
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ public void run()
457
457
458
458
// Fetch settings.
459
459
{
460
- JSONObject settingsJSON = this .getSettings ();
460
+ JSONObject settingsJSON = this .getSettings (1 );
461
461
settingsFile = new File (tmpDir , "settings.json" );
462
462
String data = settingsJSON .toString ();
463
463
Writer writer = new OutputStreamWriter (new FileOutputStream (settingsFile ), "UTF-8" );
You can’t perform that action at this time.
0 commit comments