@algolia/client-search 5.20.3 → 5.21.0

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/dist/worker.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.3";
3031
+ declare const apiClientVersion = "5.21.0";
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 allow you to send requests to the Algolia REST API.
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 allow you to send requests to the Algolia REST API.
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 allow you to send requests to the Algolia REST API.
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 allow you to send requests to the Algolia REST API.
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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.20.3",
2
+ "version": "5.21.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -49,17 +49,17 @@
49
49
  "index.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@algolia/client-common": "5.20.3",
53
- "@algolia/requester-browser-xhr": "5.20.3",
54
- "@algolia/requester-fetch": "5.20.3",
55
- "@algolia/requester-node-http": "5.20.3"
52
+ "@algolia/client-common": "5.21.0",
53
+ "@algolia/requester-browser-xhr": "5.21.0",
54
+ "@algolia/requester-fetch": "5.21.0",
55
+ "@algolia/requester-node-http": "5.21.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@arethetypeswrong/cli": "0.17.3",
59
- "@types/node": "22.13.1",
60
- "publint": "0.3.5",
61
- "rollup": "4.34.6",
62
- "tsup": "8.3.6",
58
+ "@arethetypeswrong/cli": "0.17.4",
59
+ "@types/node": "22.13.8",
60
+ "publint": "0.3.7",
61
+ "rollup": "4.34.9",
62
+ "tsup": "8.4.0",
63
63
  "typescript": "5.7.3"
64
64
  },
65
65
  "engines": {