@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/worker.js
CHANGED
|
@@ -5,6 +5,7 @@ import { createFetchRequester } from "@algolia/requester-fetch";
|
|
|
5
5
|
// src/searchClient.ts
|
|
6
6
|
import {
|
|
7
7
|
ApiError,
|
|
8
|
+
DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES,
|
|
8
9
|
createAuth,
|
|
9
10
|
createIterablePromise,
|
|
10
11
|
createTransporter,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
shuffle,
|
|
13
14
|
validateRequired
|
|
14
15
|
} from "@algolia/client-common";
|
|
15
|
-
var apiClientVersion = "5.55.
|
|
16
|
+
var apiClientVersion = "5.55.1";
|
|
16
17
|
function getDefaultHosts(appId) {
|
|
17
18
|
return [
|
|
18
19
|
{
|
|
@@ -453,10 +454,16 @@ function createSearchClient({
|
|
|
453
454
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
454
455
|
* @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.
|
|
455
456
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
456
|
-
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion.
|
|
457
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
|
|
457
458
|
* @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.
|
|
458
459
|
*/
|
|
459
|
-
async replaceAllObjects({
|
|
460
|
+
async replaceAllObjects({
|
|
461
|
+
indexName,
|
|
462
|
+
objects,
|
|
463
|
+
batchSize,
|
|
464
|
+
scopes,
|
|
465
|
+
maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
466
|
+
}, requestOptions) {
|
|
460
467
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
461
468
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
462
469
|
if (scopes === void 0) {
|