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 @@ -458,7 +458,7 @@ public Request getSettingsAsync(@NonNull CompletionHandler completionHandler) {
458
458
return getClient ().new AsyncTaskRequest (completionHandler ) {
459
459
@ NonNull
460
460
@ Override JSONObject run () throws AlgoliaException {
461
- return getSettings ();
461
+ return getSettings (2 );
462
462
}
463
463
}.start ();
464
464
}
@@ -972,8 +972,8 @@ protected JSONObject waitTask(String taskID) throws AlgoliaException {
972
972
*
973
973
* @throws AlgoliaException
974
974
*/
975
- protected JSONObject getSettings () throws AlgoliaException {
976
- return client .getRequest ("/1/indexes/" + encodedIndexName + "/settings" , false );
975
+ protected JSONObject getSettings (int formatVersion ) throws AlgoliaException {
976
+ return client .getRequest ("/1/indexes/" + encodedIndexName + "/settings?getVersion=" + formatVersion , false );
977
977
}
978
978
979
979
/**
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