Merge pull request #34485 from lucapasquale/hotfix/set-settings

[algoliasearch] Added forwardToReplicas to setSettings
This commit is contained in:
Daniel Rosenwasser
2019-04-07 18:51:48 -07:00
committed by GitHub
2 changed files with 16 additions and 1 deletions
@@ -207,6 +207,11 @@ browser.on('error', function onError(err) {
browser.stop();
index.setSettings({ hitsPerPage: 10 }, () => {})
index.setSettings({ hitsPerPage: 10 }, { forwardToReplicas: true }, () => {})
index.setSettings({ hitsPerPage: 10 }).then(() => {})
index.setSettings({ hitsPerPage: 10 }, { forwardToReplicas: true }).then(() => {})
index.browse("", {
advancedSyntax: false,
attributesToRetrieve: ['dogs']
+11 -1
View File
@@ -7,6 +7,7 @@
// Kai Eichinger <https://github.com/keichinger>
// Nery Ortez <https://github.com/neryortez>
// Antoine Rousseau <https://github.com/antoinerousseau>
// Luca Pasquale <https://github.com/lucapasquale>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -359,6 +360,15 @@ declare namespace algoliasearch {
settings: IndexSettings,
cb: (err: Error, res: Task) => void
): void;
/**
* Set an index settings
* https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings
*/
setSettings(
settings: IndexSettings,
extra: { forwardToReplicas: boolean },
cb: (err: Error, res: Task) => void
): void;
/**
* Clear cache of an index
* https://github.com/algolia/algoliasearch-client-js#cache
@@ -587,7 +597,7 @@ declare namespace algoliasearch {
* Set an index settings
* https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings
*/
setSettings(settings: IndexSettings): Promise<Task>;
setSettings(settings: IndexSettings, extra?: { forwardToReplicas: boolean }): Promise<Task>;
/**
* Search in an index
* https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search