@algolia/client-search 5.38.0 → 5.40.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/README.md +4 -4
- package/dist/browser.d.ts +58 -61
- package/dist/builds/browser.js +15 -15
- 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 +15 -15
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +15 -15
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +15 -15
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +15 -15
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +58 -61
- package/dist/node.d.cts +58 -61
- package/dist/node.d.ts +58 -61
- package/dist/src/searchClient.cjs +15 -15
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +15 -15
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +58 -61
- package/package.json +9 -9
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.
|
|
44
|
+
yarn add @algolia/client-search@5.40.0
|
|
45
45
|
# or
|
|
46
|
-
npm install @algolia/client-search@5.
|
|
46
|
+
npm install @algolia/client-search@5.40.0
|
|
47
47
|
# or
|
|
48
|
-
pnpm add @algolia/client-search@5.
|
|
48
|
+
pnpm add @algolia/client-search@5.40.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Without a package manager
|
|
@@ -53,7 +53,7 @@ pnpm add @algolia/client-search@5.38.0
|
|
|
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.
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.40.0/dist/builds/browser.umd.js"></script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ type ApiKey = {
|
|
|
38
38
|
*/
|
|
39
39
|
maxHitsPerQuery?: number | undefined;
|
|
40
40
|
/**
|
|
41
|
-
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
41
|
+
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there\'s no limit.
|
|
42
42
|
*/
|
|
43
43
|
maxQueriesPerIPPerHour?: number | undefined;
|
|
44
44
|
/**
|
|
@@ -81,7 +81,7 @@ type BatchParams = {
|
|
|
81
81
|
|
|
82
82
|
type BatchResponse = {
|
|
83
83
|
/**
|
|
84
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
84
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
85
85
|
*/
|
|
86
86
|
taskID: number;
|
|
87
87
|
/**
|
|
@@ -163,7 +163,7 @@ type RedirectRuleIndexMetadata = {
|
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
|
-
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects
|
|
166
|
+
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects), this this parameter is for internal use only.
|
|
167
167
|
*/
|
|
168
168
|
type Redirect = {
|
|
169
169
|
index?: Array<RedirectRuleIndexMetadata> | undefined;
|
|
@@ -360,7 +360,7 @@ type BaseSearchResponse = Record<string, any> & {
|
|
|
360
360
|
*/
|
|
361
361
|
userData?: any | null | undefined;
|
|
362
362
|
/**
|
|
363
|
-
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics
|
|
363
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics).
|
|
364
364
|
*/
|
|
365
365
|
queryID?: string | undefined;
|
|
366
366
|
/**
|
|
@@ -590,7 +590,7 @@ type DeleteSourceResponse = {
|
|
|
590
590
|
*/
|
|
591
591
|
type DeletedAtResponse = {
|
|
592
592
|
/**
|
|
593
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
593
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
594
594
|
*/
|
|
595
595
|
taskID: number;
|
|
596
596
|
/**
|
|
@@ -600,7 +600,7 @@ type DeletedAtResponse = {
|
|
|
600
600
|
};
|
|
601
601
|
|
|
602
602
|
/**
|
|
603
|
-
* Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
603
|
+
* Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages) and boolean values.
|
|
604
604
|
*/
|
|
605
605
|
type StandardEntries = {
|
|
606
606
|
/**
|
|
@@ -954,7 +954,7 @@ type RemoveUserIdResponse = {
|
|
|
954
954
|
*/
|
|
955
955
|
type UpdatedAtResponse = {
|
|
956
956
|
/**
|
|
957
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
957
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
958
958
|
*/
|
|
959
959
|
taskID: number;
|
|
960
960
|
/**
|
|
@@ -1056,7 +1056,7 @@ type InsideBoundingBox = string | Array<Array<number>>;
|
|
|
1056
1056
|
type NumericFilters = Array<NumericFilters> | string;
|
|
1057
1057
|
|
|
1058
1058
|
/**
|
|
1059
|
-
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria
|
|
1059
|
+
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don\'t work with numeric attributes.
|
|
1060
1060
|
*/
|
|
1061
1061
|
type OptionalFilters = Array<OptionalFilters> | string;
|
|
1062
1062
|
|
|
@@ -1076,7 +1076,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1076
1076
|
*/
|
|
1077
1077
|
similarQuery?: string | undefined;
|
|
1078
1078
|
/**
|
|
1079
|
-
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering
|
|
1079
|
+
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
1080
1080
|
*/
|
|
1081
1081
|
filters?: string | undefined;
|
|
1082
1082
|
facetFilters?: FacetFilters | undefined;
|
|
@@ -1143,7 +1143,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1143
1143
|
*/
|
|
1144
1144
|
personalizationImpact?: number | undefined;
|
|
1145
1145
|
/**
|
|
1146
|
-
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
1146
|
+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
|
|
1147
1147
|
*/
|
|
1148
1148
|
userToken?: string | undefined;
|
|
1149
1149
|
/**
|
|
@@ -1155,7 +1155,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1155
1155
|
*/
|
|
1156
1156
|
synonyms?: boolean | undefined;
|
|
1157
1157
|
/**
|
|
1158
|
-
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started
|
|
1158
|
+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started).
|
|
1159
1159
|
*/
|
|
1160
1160
|
clickAnalytics?: boolean | undefined;
|
|
1161
1161
|
/**
|
|
@@ -1163,7 +1163,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1163
1163
|
*/
|
|
1164
1164
|
analytics?: boolean | undefined;
|
|
1165
1165
|
/**
|
|
1166
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
1166
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
1167
1167
|
*/
|
|
1168
1168
|
analyticsTags?: Array<string> | undefined;
|
|
1169
1169
|
/**
|
|
@@ -1208,12 +1208,12 @@ type Mode = 'neuralSearch' | 'keywordSearch';
|
|
|
1208
1208
|
type OptionalWords = string | Array<string>;
|
|
1209
1209
|
|
|
1210
1210
|
/**
|
|
1211
|
-
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching
|
|
1211
|
+
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching).
|
|
1212
1212
|
*/
|
|
1213
1213
|
type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
1214
1214
|
|
|
1215
1215
|
/**
|
|
1216
|
-
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
1216
|
+
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.
|
|
1217
1217
|
*/
|
|
1218
1218
|
type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
1219
1219
|
|
|
@@ -1223,7 +1223,7 @@ type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
|
1223
1223
|
type RemoveStopWords = Array<SupportedLanguage> | boolean;
|
|
1224
1224
|
|
|
1225
1225
|
/**
|
|
1226
|
-
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results
|
|
1226
|
+
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results).
|
|
1227
1227
|
*/
|
|
1228
1228
|
type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
|
|
1229
1229
|
|
|
@@ -1243,7 +1243,7 @@ type SemanticSearch = {
|
|
|
1243
1243
|
type TypoToleranceEnum = 'min' | 'strict' | 'true' | 'false';
|
|
1244
1244
|
|
|
1245
1245
|
/**
|
|
1246
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
1246
|
+
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) are also active.
|
|
1247
1247
|
*/
|
|
1248
1248
|
type TypoTolerance = boolean | TypoToleranceEnum;
|
|
1249
1249
|
|
|
@@ -1253,7 +1253,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1253
1253
|
*/
|
|
1254
1254
|
attributesToRetrieve?: Array<string> | undefined;
|
|
1255
1255
|
/**
|
|
1256
|
-
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria
|
|
1256
|
+
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).
|
|
1257
1257
|
*/
|
|
1258
1258
|
ranking?: Array<string> | undefined;
|
|
1259
1259
|
/**
|
|
@@ -1261,7 +1261,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1261
1261
|
*/
|
|
1262
1262
|
relevancyStrictness?: number | undefined;
|
|
1263
1263
|
/**
|
|
1264
|
-
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js
|
|
1264
|
+
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).
|
|
1265
1265
|
*/
|
|
1266
1266
|
attributesToHighlight?: Array<string> | undefined;
|
|
1267
1267
|
/**
|
|
@@ -1302,13 +1302,13 @@ type IndexSettingsAsSearchParams = {
|
|
|
1302
1302
|
*/
|
|
1303
1303
|
allowTyposOnNumericTokens?: boolean | undefined;
|
|
1304
1304
|
/**
|
|
1305
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
1305
|
+
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance). Attribute names are case-sensitive Returning only exact matches can help when - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
1306
1306
|
*/
|
|
1307
1307
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
1308
1308
|
ignorePlurals?: IgnorePlurals | undefined;
|
|
1309
1309
|
removeStopWords?: RemoveStopWords | undefined;
|
|
1310
1310
|
/**
|
|
1311
|
-
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
1311
|
+
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
1312
1312
|
*/
|
|
1313
1313
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
1314
1314
|
/**
|
|
@@ -1363,7 +1363,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1363
1363
|
*/
|
|
1364
1364
|
maxValuesPerFacet?: number | undefined;
|
|
1365
1365
|
/**
|
|
1366
|
-
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js
|
|
1366
|
+
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
|
|
1367
1367
|
*/
|
|
1368
1368
|
sortFacetValuesBy?: string | undefined;
|
|
1369
1369
|
/**
|
|
@@ -1372,7 +1372,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1372
1372
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
1373
1373
|
renderingContent?: RenderingContent | undefined;
|
|
1374
1374
|
/**
|
|
1375
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
1375
|
+
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
1376
1376
|
*/
|
|
1377
1377
|
enableReRanking?: boolean | undefined;
|
|
1378
1378
|
reRankingApplyFilter?: ReRankingApplyFilter | null | undefined;
|
|
@@ -1543,7 +1543,7 @@ type SaveObjectResponse = {
|
|
|
1543
1543
|
*/
|
|
1544
1544
|
createdAt: string;
|
|
1545
1545
|
/**
|
|
1546
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
1546
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
1547
1547
|
*/
|
|
1548
1548
|
taskID: number;
|
|
1549
1549
|
/**
|
|
@@ -1554,7 +1554,7 @@ type SaveObjectResponse = {
|
|
|
1554
1554
|
|
|
1555
1555
|
type SaveSynonymResponse = {
|
|
1556
1556
|
/**
|
|
1557
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
1557
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
1558
1558
|
*/
|
|
1559
1559
|
taskID: number;
|
|
1560
1560
|
/**
|
|
@@ -1608,7 +1608,7 @@ type SearchDictionaryEntriesResponse = {
|
|
|
1608
1608
|
*/
|
|
1609
1609
|
hits: Array<DictionaryEntry>;
|
|
1610
1610
|
/**
|
|
1611
|
-
* Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js
|
|
1611
|
+
* Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
|
|
1612
1612
|
*/
|
|
1613
1613
|
page: number;
|
|
1614
1614
|
/**
|
|
@@ -1800,11 +1800,11 @@ type SynonymHit = {
|
|
|
1800
1800
|
*/
|
|
1801
1801
|
synonyms?: Array<string> | undefined;
|
|
1802
1802
|
/**
|
|
1803
|
-
* Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms
|
|
1803
|
+
* Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms)).
|
|
1804
1804
|
*/
|
|
1805
1805
|
input?: string | undefined;
|
|
1806
1806
|
/**
|
|
1807
|
-
* Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections
|
|
1807
|
+
* Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections)).
|
|
1808
1808
|
*/
|
|
1809
1809
|
word?: string | undefined;
|
|
1810
1810
|
/**
|
|
@@ -1812,11 +1812,11 @@ type SynonymHit = {
|
|
|
1812
1812
|
*/
|
|
1813
1813
|
corrections?: Array<string> | undefined;
|
|
1814
1814
|
/**
|
|
1815
|
-
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders
|
|
1815
|
+
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders) to be put inside records.
|
|
1816
1816
|
*/
|
|
1817
1817
|
placeholder?: string | undefined;
|
|
1818
1818
|
/**
|
|
1819
|
-
* Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders
|
|
1819
|
+
* Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders).
|
|
1820
1820
|
*/
|
|
1821
1821
|
replacements?: Array<string> | undefined;
|
|
1822
1822
|
};
|
|
@@ -1836,9 +1836,6 @@ type SearchSynonymsResponse = Record<string, any> & {
|
|
|
1836
1836
|
* OK
|
|
1837
1837
|
*/
|
|
1838
1838
|
type SearchUserIdsParams = {
|
|
1839
|
-
/**
|
|
1840
|
-
* Query to search. The search is a prefix search with [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) enabled. An empty query will retrieve all users.
|
|
1841
|
-
*/
|
|
1842
1839
|
query: string;
|
|
1843
1840
|
/**
|
|
1844
1841
|
* Cluster name.
|
|
@@ -1900,7 +1897,7 @@ type SearchUserIdsResponse = {
|
|
|
1900
1897
|
*/
|
|
1901
1898
|
page: number;
|
|
1902
1899
|
/**
|
|
1903
|
-
* Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js
|
|
1900
|
+
* Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
|
|
1904
1901
|
*/
|
|
1905
1902
|
hitsPerPage: number;
|
|
1906
1903
|
/**
|
|
@@ -1911,11 +1908,11 @@ type SearchUserIdsResponse = {
|
|
|
1911
1908
|
|
|
1912
1909
|
type BaseIndexSettings = {
|
|
1913
1910
|
/**
|
|
1914
|
-
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting
|
|
1911
|
+
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn\'t evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
|
|
1915
1912
|
*/
|
|
1916
1913
|
attributesForFaceting?: Array<string> | undefined;
|
|
1917
1914
|
/**
|
|
1918
|
-
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas
|
|
1915
|
+
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).
|
|
1919
1916
|
*/
|
|
1920
1917
|
replicas?: Array<string> | undefined;
|
|
1921
1918
|
/**
|
|
@@ -1923,11 +1920,11 @@ type BaseIndexSettings = {
|
|
|
1923
1920
|
*/
|
|
1924
1921
|
paginationLimitedTo?: number | undefined;
|
|
1925
1922
|
/**
|
|
1926
|
-
* Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data
|
|
1923
|
+
* Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data), but don\'t want to include it in the search results. Attribute names are case-sensitive.
|
|
1927
1924
|
*/
|
|
1928
1925
|
unretrievableAttributes?: Array<string> | undefined;
|
|
1929
1926
|
/**
|
|
1930
|
-
* Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation
|
|
1927
|
+
* Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) for the specified words.
|
|
1931
1928
|
*/
|
|
1932
1929
|
disableTypoToleranceOnWords?: Array<string> | undefined;
|
|
1933
1930
|
/**
|
|
@@ -1939,11 +1936,11 @@ type BaseIndexSettings = {
|
|
|
1939
1936
|
*/
|
|
1940
1937
|
camelCaseAttributes?: Array<string> | undefined;
|
|
1941
1938
|
/**
|
|
1942
|
-
* Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation
|
|
1939
|
+
* Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
1943
1940
|
*/
|
|
1944
1941
|
decompoundedAttributes?: Record<string, unknown> | undefined;
|
|
1945
1942
|
/**
|
|
1946
|
-
* Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
1943
|
+
* Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
1947
1944
|
*/
|
|
1948
1945
|
indexLanguages?: Array<SupportedLanguage> | undefined;
|
|
1949
1946
|
/**
|
|
@@ -1963,7 +1960,7 @@ type BaseIndexSettings = {
|
|
|
1963
1960
|
*/
|
|
1964
1961
|
separatorsToIndex?: string | undefined;
|
|
1965
1962
|
/**
|
|
1966
|
-
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes
|
|
1963
|
+
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
|
|
1967
1964
|
*/
|
|
1968
1965
|
searchableAttributes?: Array<string> | undefined;
|
|
1969
1966
|
/**
|
|
@@ -1971,7 +1968,7 @@ type BaseIndexSettings = {
|
|
|
1971
1968
|
*/
|
|
1972
1969
|
userData?: any | null | undefined;
|
|
1973
1970
|
/**
|
|
1974
|
-
* Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization
|
|
1971
|
+
* Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization).
|
|
1975
1972
|
*/
|
|
1976
1973
|
customNormalization?: {
|
|
1977
1974
|
[key: string]: {
|
|
@@ -1991,7 +1988,7 @@ type BaseIndexSettings = {
|
|
|
1991
1988
|
*/
|
|
1992
1989
|
keepDiacriticsOnCharacters?: string | undefined;
|
|
1993
1990
|
/**
|
|
1994
|
-
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking
|
|
1991
|
+
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision) of your first attributes, or the other attributes will never be applied.
|
|
1995
1992
|
*/
|
|
1996
1993
|
customRanking?: Array<string> | undefined;
|
|
1997
1994
|
};
|
|
@@ -2040,7 +2037,7 @@ type UpdateApiKeyResponse = {
|
|
|
2040
2037
|
*/
|
|
2041
2038
|
type UpdatedAtWithObjectIdResponse = {
|
|
2042
2039
|
/**
|
|
2043
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
2040
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
2044
2041
|
*/
|
|
2045
2042
|
taskID?: number | undefined;
|
|
2046
2043
|
/**
|
|
@@ -2125,7 +2122,7 @@ type BrowseParams = SearchParamsString | BrowseParamsObject;
|
|
|
2125
2122
|
type DeleteByParams = {
|
|
2126
2123
|
facetFilters?: FacetFilters | undefined;
|
|
2127
2124
|
/**
|
|
2128
|
-
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering
|
|
2125
|
+
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
2129
2126
|
*/
|
|
2130
2127
|
filters?: string | undefined;
|
|
2131
2128
|
numericFilters?: NumericFilters | undefined;
|
|
@@ -2213,11 +2210,11 @@ type SearchRulesParams = {
|
|
|
2213
2210
|
*/
|
|
2214
2211
|
context?: string | undefined;
|
|
2215
2212
|
/**
|
|
2216
|
-
* Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js
|
|
2213
|
+
* Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
|
|
2217
2214
|
*/
|
|
2218
2215
|
page?: number | undefined;
|
|
2219
2216
|
/**
|
|
2220
|
-
* Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js
|
|
2217
|
+
* Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
|
|
2221
2218
|
*/
|
|
2222
2219
|
hitsPerPage?: number | undefined;
|
|
2223
2220
|
/**
|
|
@@ -3055,7 +3052,7 @@ type AccountCopyIndexOptions = {
|
|
|
3055
3052
|
batchSize?: number | undefined;
|
|
3056
3053
|
};
|
|
3057
3054
|
|
|
3058
|
-
declare const apiClientVersion = "5.
|
|
3055
|
+
declare const apiClientVersion = "5.40.0";
|
|
3059
3056
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3060
3057
|
transporter: _algolia_client_common.Transporter;
|
|
3061
3058
|
/**
|
|
@@ -3258,7 +3255,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3258
3255
|
*/
|
|
3259
3256
|
addApiKey(apiKey: ApiKey, requestOptions?: RequestOptions): Promise<AddApiKeyResponse>;
|
|
3260
3257
|
/**
|
|
3261
|
-
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](
|
|
3258
|
+
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
3262
3259
|
*
|
|
3263
3260
|
* Required API Key ACLs:
|
|
3264
3261
|
* - addObject
|
|
@@ -3411,7 +3408,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3411
3408
|
*/
|
|
3412
3409
|
deleteApiKey({ key }: DeleteApiKeyProps, requestOptions?: RequestOptions): Promise<DeleteApiKeyResponse>;
|
|
3413
3410
|
/**
|
|
3414
|
-
* This operation doesn\'t accept empty filters. This operation is resource-intensive. You should only use it if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](
|
|
3411
|
+
* This operation doesn\'t accept empty filters. This operation is resource-intensive. You should only use it if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3415
3412
|
*
|
|
3416
3413
|
* Required API Key ACLs:
|
|
3417
3414
|
* - deleteIndex
|
|
@@ -3422,7 +3419,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3422
3419
|
*/
|
|
3423
3420
|
deleteBy({ indexName, deleteByParams }: DeleteByProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3424
3421
|
/**
|
|
3425
|
-
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas
|
|
3422
|
+
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).
|
|
3426
3423
|
*
|
|
3427
3424
|
* Required API Key ACLs:
|
|
3428
3425
|
* - deleteIndex
|
|
@@ -3432,7 +3429,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3432
3429
|
*/
|
|
3433
3430
|
deleteIndex({ indexName }: DeleteIndexProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3434
3431
|
/**
|
|
3435
|
-
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](
|
|
3432
|
+
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
|
|
3436
3433
|
*
|
|
3437
3434
|
* Required API Key ACLs:
|
|
3438
3435
|
* - deleteObject
|
|
@@ -3443,7 +3440,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3443
3440
|
*/
|
|
3444
3441
|
deleteObject({ indexName, objectID }: DeleteObjectProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3445
3442
|
/**
|
|
3446
|
-
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](
|
|
3443
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
3447
3444
|
*
|
|
3448
3445
|
* Required API Key ACLs:
|
|
3449
3446
|
* - editSettings
|
|
@@ -3465,7 +3462,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3465
3462
|
*/
|
|
3466
3463
|
deleteSource({ source }: DeleteSourceProps, requestOptions?: RequestOptions): Promise<DeleteSourceResponse>;
|
|
3467
3464
|
/**
|
|
3468
|
-
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](
|
|
3465
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
3469
3466
|
*
|
|
3470
3467
|
* Required API Key ACLs:
|
|
3471
3468
|
* - editSettings
|
|
@@ -3525,7 +3522,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3525
3522
|
*/
|
|
3526
3523
|
getLogs({ offset, length, indexName, type }?: GetLogsProps, requestOptions?: RequestOptions | undefined): Promise<GetLogsResponse>;
|
|
3527
3524
|
/**
|
|
3528
|
-
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](
|
|
3525
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
|
|
3529
3526
|
*
|
|
3530
3527
|
* Required API Key ACLs:
|
|
3531
3528
|
* - search
|
|
@@ -3546,7 +3543,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3546
3543
|
*/
|
|
3547
3544
|
getObjects<T>(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise<GetObjectsResponse<T>>;
|
|
3548
3545
|
/**
|
|
3549
|
-
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](
|
|
3546
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
3550
3547
|
*
|
|
3551
3548
|
* Required API Key ACLs:
|
|
3552
3549
|
* - settings
|
|
@@ -3576,7 +3573,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3576
3573
|
*/
|
|
3577
3574
|
getSources(requestOptions?: RequestOptions | undefined): Promise<Array<Source>>;
|
|
3578
3575
|
/**
|
|
3579
|
-
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](
|
|
3576
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
3580
3577
|
*
|
|
3581
3578
|
* Required API Key ACLs:
|
|
3582
3579
|
* - settings
|
|
@@ -3680,7 +3677,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3680
3677
|
*/
|
|
3681
3678
|
multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise<MultipleBatchResponse>;
|
|
3682
3679
|
/**
|
|
3683
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. - This operation is resource-intensive. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices
|
|
3680
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. - This operation is resource-intensive. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3684
3681
|
*
|
|
3685
3682
|
* Required API Key ACLs:
|
|
3686
3683
|
* - addObject
|
|
@@ -3736,7 +3733,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3736
3733
|
*/
|
|
3737
3734
|
restoreApiKey({ key }: RestoreApiKeyProps, requestOptions?: RequestOptions): Promise<AddApiKeyResponse>;
|
|
3738
3735
|
/**
|
|
3739
|
-
* Adds a record to an index or replaces it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](
|
|
3736
|
+
* Adds a record to an index or replaces it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3740
3737
|
*
|
|
3741
3738
|
* Required API Key ACLs:
|
|
3742
3739
|
* - addObject
|
|
@@ -3747,7 +3744,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3747
3744
|
*/
|
|
3748
3745
|
saveObject<T extends object>({ indexName, body }: SaveObjectProps<T>, requestOptions?: RequestOptions): Promise<SaveObjectResponse>;
|
|
3749
3746
|
/**
|
|
3750
|
-
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](
|
|
3747
|
+
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).
|
|
3751
3748
|
*
|
|
3752
3749
|
* Required API Key ACLs:
|
|
3753
3750
|
* - editSettings
|
|
@@ -3773,7 +3770,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3773
3770
|
*/
|
|
3774
3771
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }: SaveRulesProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3775
3772
|
/**
|
|
3776
|
-
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](
|
|
3773
|
+
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).
|
|
3777
3774
|
*
|
|
3778
3775
|
* Required API Key ACLs:
|
|
3779
3776
|
* - editSettings
|
|
@@ -3842,7 +3839,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3842
3839
|
*/
|
|
3843
3840
|
searchRules({ indexName, searchRulesParams }: SearchRulesProps, requestOptions?: RequestOptions): Promise<SearchRulesResponse>;
|
|
3844
3841
|
/**
|
|
3845
|
-
* Searches a single index and returns matching search results
|
|
3842
|
+
* Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
|
|
3846
3843
|
*
|
|
3847
3844
|
* Required API Key ACLs:
|
|
3848
3845
|
* - search
|