diff --git a/lib/src/index_settings.dart b/lib/src/index_settings.dart index c5fbc09..412810e 100644 --- a/lib/src/index_settings.dart +++ b/lib/src/index_settings.dart @@ -66,12 +66,15 @@ class AlgoliaSettings { }.toString(); } - Future setSettings() async { + Future setSettings({ + required bool forwardToReplicas, + }) async { assert( _parameters.keys.isNotEmpty, 'No setting parameter to update found.'); var response = await algolia._apiCall( ApiRequestType.put, - 'indexes/$encodedIndex/settings', + 'indexes/$encodedIndex/settings' + + (forwardToReplicas ? '?forwardToReplicas=true' : ''), data: _parameters, ); Map body = json.decode(response.body);