@algolia/client-search 5.20.2 → 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/dist/fetch.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/node.d.cts
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/node.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.
|
|
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(searchClient_exports);
|
|
27
27
|
var import_client_common = require("@algolia/client-common");
|
|
28
|
-
var apiClientVersion = "5.20.
|
|
28
|
+
var apiClientVersion = "5.20.4";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -880,7 +880,7 @@ function createSearchClient({
|
|
|
880
880
|
return transporter.request(request, requestOptions);
|
|
881
881
|
},
|
|
882
882
|
/**
|
|
883
|
-
* This method
|
|
883
|
+
* This method lets you send requests to the Algolia REST API.
|
|
884
884
|
* @param customDelete - The customDelete object.
|
|
885
885
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
886
886
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -902,7 +902,7 @@ function createSearchClient({
|
|
|
902
902
|
return transporter.request(request, requestOptions);
|
|
903
903
|
},
|
|
904
904
|
/**
|
|
905
|
-
* This method
|
|
905
|
+
* This method lets you send requests to the Algolia REST API.
|
|
906
906
|
* @param customGet - The customGet object.
|
|
907
907
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
908
908
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -924,7 +924,7 @@ function createSearchClient({
|
|
|
924
924
|
return transporter.request(request, requestOptions);
|
|
925
925
|
},
|
|
926
926
|
/**
|
|
927
|
-
* This method
|
|
927
|
+
* This method lets you send requests to the Algolia REST API.
|
|
928
928
|
* @param customPost - The customPost object.
|
|
929
929
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
930
930
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -948,7 +948,7 @@ function createSearchClient({
|
|
|
948
948
|
return transporter.request(request, requestOptions);
|
|
949
949
|
},
|
|
950
950
|
/**
|
|
951
|
-
* This method
|
|
951
|
+
* This method lets you send requests to the Algolia REST API.
|
|
952
952
|
* @param customPut - The customPut object.
|
|
953
953
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
954
954
|
* @param customPut.parameters - Query parameters to apply to the current query.
|