@algolia/client-search 5.55.0 → 5.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/builds/browser.js +10 -3
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +4 -4
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +5 -5
- package/dist/builds/fetch.js +10 -3
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +9 -3
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +10 -3
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +10 -3
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +4 -4
- package/dist/node.d.cts +4 -4
- package/dist/node.d.ts +4 -4
- package/dist/src/searchClient.cjs +9 -3
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +10 -3
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +4 -4
- package/package.json +6 -6
package/dist/builds/node.js
CHANGED
|
@@ -15,6 +15,7 @@ import { createHttpRequester } from "@algolia/requester-node-http";
|
|
|
15
15
|
// src/searchClient.ts
|
|
16
16
|
import {
|
|
17
17
|
ApiError,
|
|
18
|
+
DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES,
|
|
18
19
|
createAuth,
|
|
19
20
|
createIterablePromise,
|
|
20
21
|
createTransporter,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
shuffle,
|
|
23
24
|
validateRequired
|
|
24
25
|
} from "@algolia/client-common";
|
|
25
|
-
var apiClientVersion = "5.55.
|
|
26
|
+
var apiClientVersion = "5.55.1";
|
|
26
27
|
function getDefaultHosts(appId) {
|
|
27
28
|
return [
|
|
28
29
|
{
|
|
@@ -463,10 +464,16 @@ function createSearchClient({
|
|
|
463
464
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
464
465
|
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
465
466
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
466
|
-
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion.
|
|
467
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
|
|
467
468
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
468
469
|
*/
|
|
469
|
-
async replaceAllObjects({
|
|
470
|
+
async replaceAllObjects({
|
|
471
|
+
indexName,
|
|
472
|
+
objects,
|
|
473
|
+
batchSize,
|
|
474
|
+
scopes,
|
|
475
|
+
maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
476
|
+
}, requestOptions) {
|
|
470
477
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
471
478
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
472
479
|
if (scopes === void 0) {
|