@algolia/client-search 5.20.3 → 5.20.4
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 +8 -5
- package/dist/builds/browser.js +5 -5
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +1 -1
- package/dist/builds/fetch.js +5 -5
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +5 -5
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +5 -5
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +5 -5
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +8 -5
- package/dist/node.d.cts +8 -5
- package/dist/node.d.ts +8 -5
- package/dist/src/searchClient.cjs +5 -5
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +5 -5
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +8 -5
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse
|
|
|
41
41
|
### With a package manager
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
yarn add @algolia/client-search@5.20.
|
|
44
|
+
yarn add @algolia/client-search@5.20.4
|
|
45
45
|
# or
|
|
46
|
-
npm install @algolia/client-search@5.20.
|
|
46
|
+
npm install @algolia/client-search@5.20.4
|
|
47
47
|
# or
|
|
48
|
-
pnpm add @algolia/client-search@5.20.
|
|
48
|
+
pnpm add @algolia/client-search@5.20.4
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Without a package manager
|
|
@@ -53,7 +53,7 @@ pnpm add @algolia/client-search@5.20.3
|
|
|
53
53
|
Add the following JavaScript snippet to the <head> of your website:
|
|
54
54
|
|
|
55
55
|
```html
|
|
56
|
-
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.20.
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.20.4/dist/builds/browser.umd.js"></script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -1202,6 +1202,9 @@ type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
|
|
|
1202
1202
|
*/
|
|
1203
1203
|
type Mode = 'neuralSearch' | 'keywordSearch';
|
|
1204
1204
|
|
|
1205
|
+
/**
|
|
1206
|
+
* Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
|
|
1207
|
+
*/
|
|
1205
1208
|
type OptionalWords = string | Array<string>;
|
|
1206
1209
|
|
|
1207
1210
|
/**
|
|
@@ -3025,7 +3028,7 @@ type ReplaceAllObjectsOptions = {
|
|
|
3025
3028
|
scopes?: Array<ScopeType>;
|
|
3026
3029
|
};
|
|
3027
3030
|
|
|
3028
|
-
declare const apiClientVersion = "5.20.
|
|
3031
|
+
declare const apiClientVersion = "5.20.4";
|
|
3029
3032
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3030
3033
|
transporter: _algolia_client_common.Transporter;
|
|
3031
3034
|
/**
|
|
@@ -3333,7 +3336,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3333
3336
|
*/
|
|
3334
3337
|
clearSynonyms({ indexName, forwardToReplicas }: ClearSynonymsProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3335
3338
|
/**
|
|
3336
|
-
* This method
|
|
3339
|
+
* This method lets you send requests to the Algolia REST API.
|
|
3337
3340
|
* @param customDelete - The customDelete object.
|
|
3338
3341
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3339
3342
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -3341,7 +3344,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3341
3344
|
*/
|
|
3342
3345
|
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
3343
3346
|
/**
|
|
3344
|
-
* This method
|
|
3347
|
+
* This method lets you send requests to the Algolia REST API.
|
|
3345
3348
|
* @param customGet - The customGet object.
|
|
3346
3349
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3347
3350
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -3349,7 +3352,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3349
3352
|
*/
|
|
3350
3353
|
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
3351
3354
|
/**
|
|
3352
|
-
* This method
|
|
3355
|
+
* This method lets you send requests to the Algolia REST API.
|
|
3353
3356
|
* @param customPost - The customPost object.
|
|
3354
3357
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3355
3358
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -3358,7 +3361,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3358
3361
|
*/
|
|
3359
3362
|
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
3360
3363
|
/**
|
|
3361
|
-
* This method
|
|
3364
|
+
* This method lets you send requests to the Algolia REST API.
|
|
3362
3365
|
* @param customPut - The customPut object.
|
|
3363
3366
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3364
3367
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
package/dist/builds/browser.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getAlgoliaAgent,
|
|
17
17
|
shuffle
|
|
18
18
|
} from "@algolia/client-common";
|
|
19
|
-
var apiClientVersion = "5.20.
|
|
19
|
+
var apiClientVersion = "5.20.4";
|
|
20
20
|
function getDefaultHosts(appId) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
@@ -871,7 +871,7 @@ function createSearchClient({
|
|
|
871
871
|
return transporter.request(request, requestOptions);
|
|
872
872
|
},
|
|
873
873
|
/**
|
|
874
|
-
* This method
|
|
874
|
+
* This method lets you send requests to the Algolia REST API.
|
|
875
875
|
* @param customDelete - The customDelete object.
|
|
876
876
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
877
877
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -893,7 +893,7 @@ function createSearchClient({
|
|
|
893
893
|
return transporter.request(request, requestOptions);
|
|
894
894
|
},
|
|
895
895
|
/**
|
|
896
|
-
* This method
|
|
896
|
+
* This method lets you send requests to the Algolia REST API.
|
|
897
897
|
* @param customGet - The customGet object.
|
|
898
898
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
899
899
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -915,7 +915,7 @@ function createSearchClient({
|
|
|
915
915
|
return transporter.request(request, requestOptions);
|
|
916
916
|
},
|
|
917
917
|
/**
|
|
918
|
-
* This method
|
|
918
|
+
* This method lets you send requests to the Algolia REST API.
|
|
919
919
|
* @param customPost - The customPost object.
|
|
920
920
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
921
921
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -939,7 +939,7 @@ function createSearchClient({
|
|
|
939
939
|
return transporter.request(request, requestOptions);
|
|
940
940
|
},
|
|
941
941
|
/**
|
|
942
|
-
* This method
|
|
942
|
+
* This method lets you send requests to the Algolia REST API.
|
|
943
943
|
* @param customPut - The customPut object.
|
|
944
944
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
945
945
|
* @param customPut.parameters - Query parameters to apply to the current query.
|