@docsearch/js 4.3.2 → 4.5.0-beta.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/esm/index.d.ts +189 -132
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/index.js +3 -3
- package/dist/umd/index.js.map +1 -1
- package/package.json +11 -6
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import { InsightsMethodMap as InsightsMethodMap$1, InsightsClient as InsightsCli
|
|
|
2
2
|
import React, { JSX } from 'react';
|
|
3
3
|
import { JSX as JSX$1 } from 'preact';
|
|
4
4
|
|
|
5
|
+
type InitialAskAiMessage = {
|
|
6
|
+
query: string;
|
|
7
|
+
messageId?: string;
|
|
8
|
+
suggestedQuestionId?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
type Cache = {
|
|
6
12
|
/**
|
|
7
13
|
* Gets the value of the given `key`.
|
|
@@ -326,7 +332,7 @@ type ApiKey = {
|
|
|
326
332
|
*/
|
|
327
333
|
maxHitsPerQuery?: number | undefined;
|
|
328
334
|
/**
|
|
329
|
-
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
335
|
+
* 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.
|
|
330
336
|
*/
|
|
331
337
|
maxQueriesPerIPPerHour?: number | undefined;
|
|
332
338
|
/**
|
|
@@ -369,7 +375,7 @@ type BatchParams = {
|
|
|
369
375
|
|
|
370
376
|
type BatchResponse = {
|
|
371
377
|
/**
|
|
372
|
-
* 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](
|
|
378
|
+
* 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.
|
|
373
379
|
*/
|
|
374
380
|
taskID: number;
|
|
375
381
|
/**
|
|
@@ -383,7 +389,7 @@ type BatchResponse = {
|
|
|
383
389
|
*/
|
|
384
390
|
type Exhaustive$1 = {
|
|
385
391
|
/**
|
|
386
|
-
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/
|
|
392
|
+
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
387
393
|
*/
|
|
388
394
|
facetsCount?: boolean | undefined;
|
|
389
395
|
/**
|
|
@@ -451,7 +457,7 @@ type RedirectRuleIndexMetadata$1 = {
|
|
|
451
457
|
};
|
|
452
458
|
|
|
453
459
|
/**
|
|
454
|
-
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects
|
|
460
|
+
* [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.
|
|
455
461
|
*/
|
|
456
462
|
type Redirect$1 = {
|
|
457
463
|
index?: Array<RedirectRuleIndexMetadata$1> | undefined;
|
|
@@ -648,7 +654,7 @@ type BaseSearchResponse$1 = Record<string, any> & {
|
|
|
648
654
|
*/
|
|
649
655
|
userData?: any | null | undefined;
|
|
650
656
|
/**
|
|
651
|
-
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics
|
|
657
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics).
|
|
652
658
|
*/
|
|
653
659
|
queryID?: string | undefined;
|
|
654
660
|
/**
|
|
@@ -878,7 +884,7 @@ type DeleteSourceResponse = {
|
|
|
878
884
|
*/
|
|
879
885
|
type DeletedAtResponse = {
|
|
880
886
|
/**
|
|
881
|
-
* 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](
|
|
887
|
+
* 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.
|
|
882
888
|
*/
|
|
883
889
|
taskID: number;
|
|
884
890
|
/**
|
|
@@ -888,7 +894,7 @@ type DeletedAtResponse = {
|
|
|
888
894
|
};
|
|
889
895
|
|
|
890
896
|
/**
|
|
891
|
-
* 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
|
|
897
|
+
* 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.
|
|
892
898
|
*/
|
|
893
899
|
type StandardEntries = {
|
|
894
900
|
/**
|
|
@@ -1242,7 +1248,7 @@ type RemoveUserIdResponse = {
|
|
|
1242
1248
|
*/
|
|
1243
1249
|
type UpdatedAtResponse = {
|
|
1244
1250
|
/**
|
|
1245
|
-
* 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](
|
|
1251
|
+
* 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.
|
|
1246
1252
|
*/
|
|
1247
1253
|
taskID: number;
|
|
1248
1254
|
/**
|
|
@@ -1344,7 +1350,7 @@ type InsideBoundingBox$1 = string | Array<Array<number>>;
|
|
|
1344
1350
|
type NumericFilters$1 = Array<NumericFilters$1> | string;
|
|
1345
1351
|
|
|
1346
1352
|
/**
|
|
1347
|
-
* 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
|
|
1353
|
+
* 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.
|
|
1348
1354
|
*/
|
|
1349
1355
|
type OptionalFilters$1 = Array<OptionalFilters$1> | string;
|
|
1350
1356
|
|
|
@@ -1364,7 +1370,7 @@ type BaseSearchParamsWithoutQuery$1 = {
|
|
|
1364
1370
|
*/
|
|
1365
1371
|
similarQuery?: string | undefined;
|
|
1366
1372
|
/**
|
|
1367
|
-
* 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
|
|
1373
|
+
* 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).
|
|
1368
1374
|
*/
|
|
1369
1375
|
filters?: string | undefined;
|
|
1370
1376
|
facetFilters?: FacetFilters$1 | undefined;
|
|
@@ -1431,7 +1437,7 @@ type BaseSearchParamsWithoutQuery$1 = {
|
|
|
1431
1437
|
*/
|
|
1432
1438
|
personalizationImpact?: number | undefined;
|
|
1433
1439
|
/**
|
|
1434
|
-
* 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
|
|
1440
|
+
* 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).
|
|
1435
1441
|
*/
|
|
1436
1442
|
userToken?: string | undefined;
|
|
1437
1443
|
/**
|
|
@@ -1443,7 +1449,7 @@ type BaseSearchParamsWithoutQuery$1 = {
|
|
|
1443
1449
|
*/
|
|
1444
1450
|
synonyms?: boolean | undefined;
|
|
1445
1451
|
/**
|
|
1446
|
-
* 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
|
|
1452
|
+
* 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/doc/guides/sending-events/getting-started).
|
|
1447
1453
|
*/
|
|
1448
1454
|
clickAnalytics?: boolean | undefined;
|
|
1449
1455
|
/**
|
|
@@ -1451,7 +1457,7 @@ type BaseSearchParamsWithoutQuery$1 = {
|
|
|
1451
1457
|
*/
|
|
1452
1458
|
analytics?: boolean | undefined;
|
|
1453
1459
|
/**
|
|
1454
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
1460
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
1455
1461
|
*/
|
|
1456
1462
|
analyticsTags?: Array<string> | undefined;
|
|
1457
1463
|
/**
|
|
@@ -1496,12 +1502,12 @@ type Mode$1 = 'neuralSearch' | 'keywordSearch';
|
|
|
1496
1502
|
type OptionalWords$1 = string | Array<string>;
|
|
1497
1503
|
|
|
1498
1504
|
/**
|
|
1499
|
-
* 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
|
|
1505
|
+
* 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).
|
|
1500
1506
|
*/
|
|
1501
1507
|
type QueryType$1 = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
1502
1508
|
|
|
1503
1509
|
/**
|
|
1504
|
-
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
1510
|
+
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.
|
|
1505
1511
|
*/
|
|
1506
1512
|
type ReRankingApplyFilter$1 = Array<ReRankingApplyFilter$1> | string;
|
|
1507
1513
|
|
|
@@ -1511,7 +1517,7 @@ type ReRankingApplyFilter$1 = Array<ReRankingApplyFilter$1> | string;
|
|
|
1511
1517
|
type RemoveStopWords$1 = Array<SupportedLanguage$1> | boolean;
|
|
1512
1518
|
|
|
1513
1519
|
/**
|
|
1514
|
-
* 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
|
|
1520
|
+
* 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).
|
|
1515
1521
|
*/
|
|
1516
1522
|
type RemoveWordsIfNoResults$1 = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
|
|
1517
1523
|
|
|
@@ -1531,7 +1537,7 @@ type SemanticSearch$1 = {
|
|
|
1531
1537
|
type TypoToleranceEnum$1 = 'min' | 'strict' | 'true' | 'false';
|
|
1532
1538
|
|
|
1533
1539
|
/**
|
|
1534
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
1540
|
+
* 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.
|
|
1535
1541
|
*/
|
|
1536
1542
|
type TypoTolerance$1 = boolean | TypoToleranceEnum$1;
|
|
1537
1543
|
|
|
@@ -1541,7 +1547,7 @@ type IndexSettingsAsSearchParams$1 = {
|
|
|
1541
1547
|
*/
|
|
1542
1548
|
attributesToRetrieve?: Array<string> | undefined;
|
|
1543
1549
|
/**
|
|
1544
|
-
* 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
|
|
1550
|
+
* 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).
|
|
1545
1551
|
*/
|
|
1546
1552
|
ranking?: Array<string> | undefined;
|
|
1547
1553
|
/**
|
|
@@ -1549,7 +1555,7 @@ type IndexSettingsAsSearchParams$1 = {
|
|
|
1549
1555
|
*/
|
|
1550
1556
|
relevancyStrictness?: number | undefined;
|
|
1551
1557
|
/**
|
|
1552
|
-
* 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
|
|
1558
|
+
* 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).
|
|
1553
1559
|
*/
|
|
1554
1560
|
attributesToHighlight?: Array<string> | undefined;
|
|
1555
1561
|
/**
|
|
@@ -1590,13 +1596,13 @@ type IndexSettingsAsSearchParams$1 = {
|
|
|
1590
1596
|
*/
|
|
1591
1597
|
allowTyposOnNumericTokens?: boolean | undefined;
|
|
1592
1598
|
/**
|
|
1593
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
1599
|
+
* 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.
|
|
1594
1600
|
*/
|
|
1595
1601
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
1596
1602
|
ignorePlurals?: IgnorePlurals$1 | undefined;
|
|
1597
1603
|
removeStopWords?: RemoveStopWords$1 | undefined;
|
|
1598
1604
|
/**
|
|
1599
|
-
* 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
|
|
1605
|
+
* 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).
|
|
1600
1606
|
*/
|
|
1601
1607
|
queryLanguages?: Array<SupportedLanguage$1> | undefined;
|
|
1602
1608
|
/**
|
|
@@ -1651,7 +1657,7 @@ type IndexSettingsAsSearchParams$1 = {
|
|
|
1651
1657
|
*/
|
|
1652
1658
|
maxValuesPerFacet?: number | undefined;
|
|
1653
1659
|
/**
|
|
1654
|
-
* 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
|
|
1660
|
+
* 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).
|
|
1655
1661
|
*/
|
|
1656
1662
|
sortFacetValuesBy?: string | undefined;
|
|
1657
1663
|
/**
|
|
@@ -1660,7 +1666,7 @@ type IndexSettingsAsSearchParams$1 = {
|
|
|
1660
1666
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
1661
1667
|
renderingContent?: RenderingContent$1 | undefined;
|
|
1662
1668
|
/**
|
|
1663
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
1669
|
+
* 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.
|
|
1664
1670
|
*/
|
|
1665
1671
|
enableReRanking?: boolean | undefined;
|
|
1666
1672
|
reRankingApplyFilter?: ReRankingApplyFilter$1 | null | undefined;
|
|
@@ -1679,7 +1685,7 @@ type AutomaticFacetFilter = {
|
|
|
1679
1685
|
*/
|
|
1680
1686
|
score?: number | undefined;
|
|
1681
1687
|
/**
|
|
1682
|
-
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple
|
|
1688
|
+
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurrences are combined with the logical `OR` operation. If false, multiple occurrences are combined with the logical `AND` operation.
|
|
1683
1689
|
*/
|
|
1684
1690
|
disjunctive?: boolean | undefined;
|
|
1685
1691
|
};
|
|
@@ -1831,7 +1837,7 @@ type SaveObjectResponse = {
|
|
|
1831
1837
|
*/
|
|
1832
1838
|
createdAt: string;
|
|
1833
1839
|
/**
|
|
1834
|
-
* 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](
|
|
1840
|
+
* 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.
|
|
1835
1841
|
*/
|
|
1836
1842
|
taskID: number;
|
|
1837
1843
|
/**
|
|
@@ -1842,7 +1848,7 @@ type SaveObjectResponse = {
|
|
|
1842
1848
|
|
|
1843
1849
|
type SaveSynonymResponse = {
|
|
1844
1850
|
/**
|
|
1845
|
-
* 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](
|
|
1851
|
+
* 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.
|
|
1846
1852
|
*/
|
|
1847
1853
|
taskID: number;
|
|
1848
1854
|
/**
|
|
@@ -1896,7 +1902,7 @@ type SearchDictionaryEntriesResponse = {
|
|
|
1896
1902
|
*/
|
|
1897
1903
|
hits: Array<DictionaryEntry>;
|
|
1898
1904
|
/**
|
|
1899
|
-
* 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
|
|
1905
|
+
* 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.
|
|
1900
1906
|
*/
|
|
1901
1907
|
page: number;
|
|
1902
1908
|
/**
|
|
@@ -1919,7 +1925,7 @@ type FacetHits$1 = {
|
|
|
1919
1925
|
*/
|
|
1920
1926
|
highlighted: string;
|
|
1921
1927
|
/**
|
|
1922
|
-
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/
|
|
1928
|
+
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
1923
1929
|
*/
|
|
1924
1930
|
count: number;
|
|
1925
1931
|
};
|
|
@@ -1930,7 +1936,7 @@ type SearchForFacetValuesResponse$2 = {
|
|
|
1930
1936
|
*/
|
|
1931
1937
|
facetHits: Array<FacetHits$1>;
|
|
1932
1938
|
/**
|
|
1933
|
-
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/
|
|
1939
|
+
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
1934
1940
|
*/
|
|
1935
1941
|
exhaustiveFacetsCount: boolean;
|
|
1936
1942
|
/**
|
|
@@ -2088,11 +2094,11 @@ type SynonymHit = {
|
|
|
2088
2094
|
*/
|
|
2089
2095
|
synonyms?: Array<string> | undefined;
|
|
2090
2096
|
/**
|
|
2091
|
-
* 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
|
|
2097
|
+
* 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)).
|
|
2092
2098
|
*/
|
|
2093
2099
|
input?: string | undefined;
|
|
2094
2100
|
/**
|
|
2095
|
-
* 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
|
|
2101
|
+
* 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)).
|
|
2096
2102
|
*/
|
|
2097
2103
|
word?: string | undefined;
|
|
2098
2104
|
/**
|
|
@@ -2100,11 +2106,11 @@ type SynonymHit = {
|
|
|
2100
2106
|
*/
|
|
2101
2107
|
corrections?: Array<string> | undefined;
|
|
2102
2108
|
/**
|
|
2103
|
-
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders
|
|
2109
|
+
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders) to be put inside records.
|
|
2104
2110
|
*/
|
|
2105
2111
|
placeholder?: string | undefined;
|
|
2106
2112
|
/**
|
|
2107
|
-
* 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
|
|
2113
|
+
* 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).
|
|
2108
2114
|
*/
|
|
2109
2115
|
replacements?: Array<string> | undefined;
|
|
2110
2116
|
};
|
|
@@ -2124,9 +2130,6 @@ type SearchSynonymsResponse = Record<string, any> & {
|
|
|
2124
2130
|
* OK
|
|
2125
2131
|
*/
|
|
2126
2132
|
type SearchUserIdsParams = {
|
|
2127
|
-
/**
|
|
2128
|
-
* 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.
|
|
2129
|
-
*/
|
|
2130
2133
|
query: string;
|
|
2131
2134
|
/**
|
|
2132
2135
|
* Cluster name.
|
|
@@ -2188,7 +2191,7 @@ type SearchUserIdsResponse = {
|
|
|
2188
2191
|
*/
|
|
2189
2192
|
page: number;
|
|
2190
2193
|
/**
|
|
2191
|
-
* 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
|
|
2194
|
+
* 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.
|
|
2192
2195
|
*/
|
|
2193
2196
|
hitsPerPage: number;
|
|
2194
2197
|
/**
|
|
@@ -2199,11 +2202,11 @@ type SearchUserIdsResponse = {
|
|
|
2199
2202
|
|
|
2200
2203
|
type BaseIndexSettings$1 = {
|
|
2201
2204
|
/**
|
|
2202
|
-
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting
|
|
2205
|
+
* 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))`.
|
|
2203
2206
|
*/
|
|
2204
2207
|
attributesForFaceting?: Array<string> | undefined;
|
|
2205
2208
|
/**
|
|
2206
|
-
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas
|
|
2209
|
+
* 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).
|
|
2207
2210
|
*/
|
|
2208
2211
|
replicas?: Array<string> | undefined;
|
|
2209
2212
|
/**
|
|
@@ -2211,11 +2214,11 @@ type BaseIndexSettings$1 = {
|
|
|
2211
2214
|
*/
|
|
2212
2215
|
paginationLimitedTo?: number | undefined;
|
|
2213
2216
|
/**
|
|
2214
|
-
* 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
|
|
2217
|
+
* 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.
|
|
2215
2218
|
*/
|
|
2216
2219
|
unretrievableAttributes?: Array<string> | undefined;
|
|
2217
2220
|
/**
|
|
2218
|
-
* 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
|
|
2221
|
+
* 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.
|
|
2219
2222
|
*/
|
|
2220
2223
|
disableTypoToleranceOnWords?: Array<string> | undefined;
|
|
2221
2224
|
/**
|
|
@@ -2227,11 +2230,11 @@ type BaseIndexSettings$1 = {
|
|
|
2227
2230
|
*/
|
|
2228
2231
|
camelCaseAttributes?: Array<string> | undefined;
|
|
2229
2232
|
/**
|
|
2230
|
-
* 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
|
|
2233
|
+
* 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).
|
|
2231
2234
|
*/
|
|
2232
2235
|
decompoundedAttributes?: Record<string, unknown> | undefined;
|
|
2233
2236
|
/**
|
|
2234
|
-
* 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
|
|
2237
|
+
* 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).
|
|
2235
2238
|
*/
|
|
2236
2239
|
indexLanguages?: Array<SupportedLanguage$1> | undefined;
|
|
2237
2240
|
/**
|
|
@@ -2251,7 +2254,7 @@ type BaseIndexSettings$1 = {
|
|
|
2251
2254
|
*/
|
|
2252
2255
|
separatorsToIndex?: string | undefined;
|
|
2253
2256
|
/**
|
|
2254
|
-
* 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
|
|
2257
|
+
* 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.
|
|
2255
2258
|
*/
|
|
2256
2259
|
searchableAttributes?: Array<string> | undefined;
|
|
2257
2260
|
/**
|
|
@@ -2259,7 +2262,7 @@ type BaseIndexSettings$1 = {
|
|
|
2259
2262
|
*/
|
|
2260
2263
|
userData?: any | null | undefined;
|
|
2261
2264
|
/**
|
|
2262
|
-
* 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
|
|
2265
|
+
* 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).
|
|
2263
2266
|
*/
|
|
2264
2267
|
customNormalization?: {
|
|
2265
2268
|
[key: string]: {
|
|
@@ -2279,7 +2282,7 @@ type BaseIndexSettings$1 = {
|
|
|
2279
2282
|
*/
|
|
2280
2283
|
keepDiacriticsOnCharacters?: string | undefined;
|
|
2281
2284
|
/**
|
|
2282
|
-
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking
|
|
2285
|
+
* 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.
|
|
2283
2286
|
*/
|
|
2284
2287
|
customRanking?: Array<string> | undefined;
|
|
2285
2288
|
};
|
|
@@ -2328,7 +2331,7 @@ type UpdateApiKeyResponse = {
|
|
|
2328
2331
|
*/
|
|
2329
2332
|
type UpdatedAtWithObjectIdResponse = {
|
|
2330
2333
|
/**
|
|
2331
|
-
* 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](
|
|
2334
|
+
* 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.
|
|
2332
2335
|
*/
|
|
2333
2336
|
taskID?: number | undefined;
|
|
2334
2337
|
/**
|
|
@@ -2413,7 +2416,7 @@ type BrowseParams = SearchParamsString$1 | BrowseParamsObject;
|
|
|
2413
2416
|
type DeleteByParams = {
|
|
2414
2417
|
facetFilters?: FacetFilters$1 | undefined;
|
|
2415
2418
|
/**
|
|
2416
|
-
* 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
|
|
2419
|
+
* 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).
|
|
2417
2420
|
*/
|
|
2418
2421
|
filters?: string | undefined;
|
|
2419
2422
|
numericFilters?: NumericFilters$1 | undefined;
|
|
@@ -2501,11 +2504,11 @@ type SearchRulesParams = {
|
|
|
2501
2504
|
*/
|
|
2502
2505
|
context?: string | undefined;
|
|
2503
2506
|
/**
|
|
2504
|
-
* 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
|
|
2507
|
+
* 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.
|
|
2505
2508
|
*/
|
|
2506
2509
|
page?: number | undefined;
|
|
2507
2510
|
/**
|
|
2508
|
-
* 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
|
|
2511
|
+
* 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.
|
|
2509
2512
|
*/
|
|
2510
2513
|
hitsPerPage?: number | undefined;
|
|
2511
2514
|
/**
|
|
@@ -3492,7 +3495,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3492
3495
|
* @param partialUpdateObjects - The `partialUpdateObjects` object.
|
|
3493
3496
|
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
3494
3497
|
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
3495
|
-
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail
|
|
3498
|
+
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
3496
3499
|
* @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3497
3500
|
* @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3498
3501
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
@@ -3544,7 +3547,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3544
3547
|
*/
|
|
3545
3548
|
addApiKey(apiKey: ApiKey, requestOptions?: RequestOptions): Promise<AddApiKeyResponse>;
|
|
3546
3549
|
/**
|
|
3547
|
-
* 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](
|
|
3550
|
+
* 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).
|
|
3548
3551
|
*
|
|
3549
3552
|
* Required API Key ACLs:
|
|
3550
3553
|
* - addObject
|
|
@@ -3578,7 +3581,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3578
3581
|
*/
|
|
3579
3582
|
assignUserId({ xAlgoliaUserID, assignUserIdParams }: AssignUserIdProps, requestOptions?: RequestOptions): Promise<CreatedAtResponse>;
|
|
3580
3583
|
/**
|
|
3581
|
-
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/
|
|
3584
|
+
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3585
|
+
*
|
|
3586
|
+
* Required API Key ACLs:
|
|
3587
|
+
* - addObject
|
|
3582
3588
|
* @param batch - The batch object.
|
|
3583
3589
|
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
3584
3590
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
@@ -3621,7 +3627,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3621
3627
|
*/
|
|
3622
3628
|
browse<T>({ indexName, browseParams }: BrowseProps, requestOptions?: RequestOptions): Promise<BrowseResponse<T>>;
|
|
3623
3629
|
/**
|
|
3624
|
-
* Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/
|
|
3630
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3625
3631
|
*
|
|
3626
3632
|
* Required API Key ACLs:
|
|
3627
3633
|
* - deleteIndex
|
|
@@ -3697,7 +3703,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3697
3703
|
*/
|
|
3698
3704
|
deleteApiKey({ key }: DeleteApiKeyProps, requestOptions?: RequestOptions): Promise<DeleteApiKeyResponse>;
|
|
3699
3705
|
/**
|
|
3700
|
-
* 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](
|
|
3706
|
+
* 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/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3701
3707
|
*
|
|
3702
3708
|
* Required API Key ACLs:
|
|
3703
3709
|
* - deleteIndex
|
|
@@ -3708,7 +3714,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3708
3714
|
*/
|
|
3709
3715
|
deleteBy({ indexName, deleteByParams }: DeleteByProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3710
3716
|
/**
|
|
3711
|
-
* 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
|
|
3717
|
+
* 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).
|
|
3712
3718
|
*
|
|
3713
3719
|
* Required API Key ACLs:
|
|
3714
3720
|
* - deleteIndex
|
|
@@ -3718,7 +3724,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3718
3724
|
*/
|
|
3719
3725
|
deleteIndex({ indexName }: DeleteIndexProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3720
3726
|
/**
|
|
3721
|
-
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](
|
|
3727
|
+
* 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).
|
|
3722
3728
|
*
|
|
3723
3729
|
* Required API Key ACLs:
|
|
3724
3730
|
* - deleteObject
|
|
@@ -3729,7 +3735,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3729
3735
|
*/
|
|
3730
3736
|
deleteObject({ indexName, objectID }: DeleteObjectProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3731
3737
|
/**
|
|
3732
|
-
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](
|
|
3738
|
+
* 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).
|
|
3733
3739
|
*
|
|
3734
3740
|
* Required API Key ACLs:
|
|
3735
3741
|
* - editSettings
|
|
@@ -3751,7 +3757,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3751
3757
|
*/
|
|
3752
3758
|
deleteSource({ source }: DeleteSourceProps, requestOptions?: RequestOptions): Promise<DeleteSourceResponse>;
|
|
3753
3759
|
/**
|
|
3754
|
-
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](
|
|
3760
|
+
* 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).
|
|
3755
3761
|
*
|
|
3756
3762
|
* Required API Key ACLs:
|
|
3757
3763
|
* - editSettings
|
|
@@ -3764,6 +3770,9 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3764
3770
|
deleteSynonym({ indexName, objectID, forwardToReplicas }: DeleteSynonymProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3765
3771
|
/**
|
|
3766
3772
|
* Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.
|
|
3773
|
+
*
|
|
3774
|
+
* Required API Key ACLs:
|
|
3775
|
+
* - search
|
|
3767
3776
|
* @param getApiKey - The getApiKey object.
|
|
3768
3777
|
* @param getApiKey.key - API key.
|
|
3769
3778
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3798,7 +3807,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3798
3807
|
*/
|
|
3799
3808
|
getDictionarySettings(requestOptions?: RequestOptions | undefined): Promise<GetDictionarySettingsResponse>;
|
|
3800
3809
|
/**
|
|
3801
|
-
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/
|
|
3810
|
+
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
|
|
3802
3811
|
*
|
|
3803
3812
|
* Required API Key ACLs:
|
|
3804
3813
|
* - logs
|
|
@@ -3811,7 +3820,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3811
3820
|
*/
|
|
3812
3821
|
getLogs({ offset, length, indexName, type }?: GetLogsProps, requestOptions?: RequestOptions | undefined): Promise<GetLogsResponse>;
|
|
3813
3822
|
/**
|
|
3814
|
-
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](
|
|
3823
|
+
* 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).
|
|
3815
3824
|
*
|
|
3816
3825
|
* Required API Key ACLs:
|
|
3817
3826
|
* - search
|
|
@@ -3832,7 +3841,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3832
3841
|
*/
|
|
3833
3842
|
getObjects<T>(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise<GetObjectsResponse<T>>;
|
|
3834
3843
|
/**
|
|
3835
|
-
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](
|
|
3844
|
+
* 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).
|
|
3836
3845
|
*
|
|
3837
3846
|
* Required API Key ACLs:
|
|
3838
3847
|
* - settings
|
|
@@ -3862,7 +3871,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3862
3871
|
*/
|
|
3863
3872
|
getSources(requestOptions?: RequestOptions | undefined): Promise<Array<Source>>;
|
|
3864
3873
|
/**
|
|
3865
|
-
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](
|
|
3874
|
+
* 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).
|
|
3866
3875
|
*
|
|
3867
3876
|
* Required API Key ACLs:
|
|
3868
3877
|
* - settings
|
|
@@ -3960,13 +3969,16 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3960
3969
|
*/
|
|
3961
3970
|
listUserIds({ page, hitsPerPage }?: ListUserIdsProps, requestOptions?: RequestOptions | undefined): Promise<ListUserIdsResponse>;
|
|
3962
3971
|
/**
|
|
3963
|
-
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/
|
|
3972
|
+
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3973
|
+
*
|
|
3974
|
+
* Required API Key ACLs:
|
|
3975
|
+
* - addObject
|
|
3964
3976
|
* @param batchParams - The batchParams object.
|
|
3965
3977
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3966
3978
|
*/
|
|
3967
3979
|
multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise<MultipleBatchResponse>;
|
|
3968
3980
|
/**
|
|
3969
|
-
* 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
|
|
3981
|
+
* 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/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3970
3982
|
*
|
|
3971
3983
|
* Required API Key ACLs:
|
|
3972
3984
|
* - addObject
|
|
@@ -3977,7 +3989,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3977
3989
|
*/
|
|
3978
3990
|
operationIndex({ indexName, operationIndexParams }: OperationIndexProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3979
3991
|
/**
|
|
3980
|
-
* Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, this operation replaces its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, you should use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/
|
|
3992
|
+
* Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, this operation replaces its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, you should use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3981
3993
|
*
|
|
3982
3994
|
* Required API Key ACLs:
|
|
3983
3995
|
* - addObject
|
|
@@ -4022,7 +4034,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
4022
4034
|
*/
|
|
4023
4035
|
restoreApiKey({ key }: RestoreApiKeyProps, requestOptions?: RequestOptions): Promise<AddApiKeyResponse>;
|
|
4024
4036
|
/**
|
|
4025
|
-
* 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](
|
|
4037
|
+
* 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/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
4026
4038
|
*
|
|
4027
4039
|
* Required API Key ACLs:
|
|
4028
4040
|
* - addObject
|
|
@@ -4033,7 +4045,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
4033
4045
|
*/
|
|
4034
4046
|
saveObject<T extends object>({ indexName, body }: SaveObjectProps<T>, requestOptions?: RequestOptions): Promise<SaveObjectResponse>;
|
|
4035
4047
|
/**
|
|
4036
|
-
* 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](
|
|
4048
|
+
* 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).
|
|
4037
4049
|
*
|
|
4038
4050
|
* Required API Key ACLs:
|
|
4039
4051
|
* - editSettings
|
|
@@ -4046,7 +4058,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
4046
4058
|
*/
|
|
4047
4059
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: SaveRuleProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
4048
4060
|
/**
|
|
4049
|
-
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/
|
|
4061
|
+
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
4050
4062
|
*
|
|
4051
4063
|
* Required API Key ACLs:
|
|
4052
4064
|
* - editSettings
|
|
@@ -4059,7 +4071,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
4059
4071
|
*/
|
|
4060
4072
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }: SaveRulesProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
4061
4073
|
/**
|
|
4062
|
-
* 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](
|
|
4074
|
+
* 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).
|
|
4063
4075
|
*
|
|
4064
4076
|
* Required API Key ACLs:
|
|
4065
4077
|
* - editSettings
|
|
@@ -4072,7 +4084,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
4072
4084
|
*/
|
|
4073
4085
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: SaveSynonymProps, requestOptions?: RequestOptions): Promise<SaveSynonymResponse>;
|
|
4074
4086
|
/**
|
|
4075
|
-
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/
|
|
4087
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
4076
4088
|
*
|
|
4077
4089
|
* Required API Key ACLs:
|
|
4078
4090
|
* - editSettings
|
|
@@ -4128,7 +4140,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
4128
4140
|
*/
|
|
4129
4141
|
searchRules({ indexName, searchRulesParams }: SearchRulesProps, requestOptions?: RequestOptions): Promise<SearchRulesResponse>;
|
|
4130
4142
|
/**
|
|
4131
|
-
* Searches a single index and returns matching search results
|
|
4143
|
+
* 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.
|
|
4132
4144
|
*
|
|
4133
4145
|
* Required API Key ACLs:
|
|
4134
4146
|
* - search
|
|
@@ -4242,7 +4254,7 @@ type InsideBoundingBox = string | Array<Array<number>>;
|
|
|
4242
4254
|
type NumericFilters = Array<NumericFilters> | string;
|
|
4243
4255
|
|
|
4244
4256
|
/**
|
|
4245
|
-
* 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
|
|
4257
|
+
* 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.
|
|
4246
4258
|
*/
|
|
4247
4259
|
type OptionalFilters = Array<OptionalFilters> | string;
|
|
4248
4260
|
|
|
@@ -4262,7 +4274,7 @@ type BaseRecommendSearchParams = {
|
|
|
4262
4274
|
*/
|
|
4263
4275
|
similarQuery?: string | undefined;
|
|
4264
4276
|
/**
|
|
4265
|
-
* 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
|
|
4277
|
+
* 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).
|
|
4266
4278
|
*/
|
|
4267
4279
|
filters?: string | undefined;
|
|
4268
4280
|
facetFilters?: FacetFilters | undefined;
|
|
@@ -4317,7 +4329,7 @@ type BaseRecommendSearchParams = {
|
|
|
4317
4329
|
*/
|
|
4318
4330
|
personalizationImpact?: number | undefined;
|
|
4319
4331
|
/**
|
|
4320
|
-
* 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
|
|
4332
|
+
* 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).
|
|
4321
4333
|
*/
|
|
4322
4334
|
userToken?: string | undefined;
|
|
4323
4335
|
/**
|
|
@@ -4329,7 +4341,7 @@ type BaseRecommendSearchParams = {
|
|
|
4329
4341
|
*/
|
|
4330
4342
|
synonyms?: boolean | undefined;
|
|
4331
4343
|
/**
|
|
4332
|
-
* 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
|
|
4344
|
+
* 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/doc/guides/sending-events/getting-started).
|
|
4333
4345
|
*/
|
|
4334
4346
|
clickAnalytics?: boolean | undefined;
|
|
4335
4347
|
/**
|
|
@@ -4337,7 +4349,7 @@ type BaseRecommendSearchParams = {
|
|
|
4337
4349
|
*/
|
|
4338
4350
|
analytics?: boolean | undefined;
|
|
4339
4351
|
/**
|
|
4340
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
4352
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
4341
4353
|
*/
|
|
4342
4354
|
analyticsTags?: Array<string> | undefined;
|
|
4343
4355
|
/**
|
|
@@ -4352,11 +4364,11 @@ type BaseRecommendSearchParams = {
|
|
|
4352
4364
|
|
|
4353
4365
|
type BaseIndexSettings = {
|
|
4354
4366
|
/**
|
|
4355
|
-
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting
|
|
4367
|
+
* 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))`.
|
|
4356
4368
|
*/
|
|
4357
4369
|
attributesForFaceting?: Array<string> | undefined;
|
|
4358
4370
|
/**
|
|
4359
|
-
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas
|
|
4371
|
+
* 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).
|
|
4360
4372
|
*/
|
|
4361
4373
|
replicas?: Array<string> | undefined;
|
|
4362
4374
|
/**
|
|
@@ -4364,11 +4376,11 @@ type BaseIndexSettings = {
|
|
|
4364
4376
|
*/
|
|
4365
4377
|
paginationLimitedTo?: number | undefined;
|
|
4366
4378
|
/**
|
|
4367
|
-
* 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
|
|
4379
|
+
* 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.
|
|
4368
4380
|
*/
|
|
4369
4381
|
unretrievableAttributes?: Array<string> | undefined;
|
|
4370
4382
|
/**
|
|
4371
|
-
* 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
|
|
4383
|
+
* 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.
|
|
4372
4384
|
*/
|
|
4373
4385
|
disableTypoToleranceOnWords?: Array<string> | undefined;
|
|
4374
4386
|
/**
|
|
@@ -4380,11 +4392,11 @@ type BaseIndexSettings = {
|
|
|
4380
4392
|
*/
|
|
4381
4393
|
camelCaseAttributes?: Array<string> | undefined;
|
|
4382
4394
|
/**
|
|
4383
|
-
* 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
|
|
4395
|
+
* 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).
|
|
4384
4396
|
*/
|
|
4385
4397
|
decompoundedAttributes?: Record<string, unknown> | undefined;
|
|
4386
4398
|
/**
|
|
4387
|
-
* 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
|
|
4399
|
+
* 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).
|
|
4388
4400
|
*/
|
|
4389
4401
|
indexLanguages?: Array<SupportedLanguage> | undefined;
|
|
4390
4402
|
/**
|
|
@@ -4404,7 +4416,7 @@ type BaseIndexSettings = {
|
|
|
4404
4416
|
*/
|
|
4405
4417
|
separatorsToIndex?: string | undefined;
|
|
4406
4418
|
/**
|
|
4407
|
-
* 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
|
|
4419
|
+
* 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.
|
|
4408
4420
|
*/
|
|
4409
4421
|
searchableAttributes?: Array<string> | undefined;
|
|
4410
4422
|
/**
|
|
@@ -4412,7 +4424,7 @@ type BaseIndexSettings = {
|
|
|
4412
4424
|
*/
|
|
4413
4425
|
userData?: any | null | undefined;
|
|
4414
4426
|
/**
|
|
4415
|
-
* 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
|
|
4427
|
+
* 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).
|
|
4416
4428
|
*/
|
|
4417
4429
|
customNormalization?: {
|
|
4418
4430
|
[key: string]: {
|
|
@@ -4432,7 +4444,7 @@ type BaseIndexSettings = {
|
|
|
4432
4444
|
*/
|
|
4433
4445
|
keepDiacriticsOnCharacters?: string | undefined;
|
|
4434
4446
|
/**
|
|
4435
|
-
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking
|
|
4447
|
+
* 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.
|
|
4436
4448
|
*/
|
|
4437
4449
|
customRanking?: Array<string> | undefined;
|
|
4438
4450
|
};
|
|
@@ -4464,12 +4476,12 @@ type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
|
|
|
4464
4476
|
type OptionalWords = string | Array<string>;
|
|
4465
4477
|
|
|
4466
4478
|
/**
|
|
4467
|
-
* 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
|
|
4479
|
+
* 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).
|
|
4468
4480
|
*/
|
|
4469
4481
|
type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
4470
4482
|
|
|
4471
4483
|
/**
|
|
4472
|
-
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
4484
|
+
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.
|
|
4473
4485
|
*/
|
|
4474
4486
|
type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
4475
4487
|
|
|
@@ -4479,7 +4491,7 @@ type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
|
4479
4491
|
type RemoveStopWords = Array<SupportedLanguage> | boolean;
|
|
4480
4492
|
|
|
4481
4493
|
/**
|
|
4482
|
-
* 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
|
|
4494
|
+
* 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).
|
|
4483
4495
|
*/
|
|
4484
4496
|
type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
|
|
4485
4497
|
|
|
@@ -4585,7 +4597,7 @@ type RenderingContent = {
|
|
|
4585
4597
|
type TypoToleranceEnum = 'min' | 'strict' | 'true' | 'false';
|
|
4586
4598
|
|
|
4587
4599
|
/**
|
|
4588
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
4600
|
+
* 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.
|
|
4589
4601
|
*/
|
|
4590
4602
|
type TypoTolerance = boolean | TypoToleranceEnum;
|
|
4591
4603
|
|
|
@@ -4595,7 +4607,7 @@ type BaseRecommendIndexSettings = {
|
|
|
4595
4607
|
*/
|
|
4596
4608
|
attributesToRetrieve?: Array<string> | undefined;
|
|
4597
4609
|
/**
|
|
4598
|
-
* 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
|
|
4610
|
+
* 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).
|
|
4599
4611
|
*/
|
|
4600
4612
|
ranking?: Array<string> | undefined;
|
|
4601
4613
|
/**
|
|
@@ -4603,7 +4615,7 @@ type BaseRecommendIndexSettings = {
|
|
|
4603
4615
|
*/
|
|
4604
4616
|
relevancyStrictness?: number | undefined;
|
|
4605
4617
|
/**
|
|
4606
|
-
* 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
|
|
4618
|
+
* 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).
|
|
4607
4619
|
*/
|
|
4608
4620
|
attributesToHighlight?: Array<string> | undefined;
|
|
4609
4621
|
/**
|
|
@@ -4640,13 +4652,13 @@ type BaseRecommendIndexSettings = {
|
|
|
4640
4652
|
*/
|
|
4641
4653
|
allowTyposOnNumericTokens?: boolean | undefined;
|
|
4642
4654
|
/**
|
|
4643
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
4655
|
+
* 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.
|
|
4644
4656
|
*/
|
|
4645
4657
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
4646
4658
|
ignorePlurals?: IgnorePlurals | undefined;
|
|
4647
4659
|
removeStopWords?: RemoveStopWords | undefined;
|
|
4648
4660
|
/**
|
|
4649
|
-
* 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
|
|
4661
|
+
* 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).
|
|
4650
4662
|
*/
|
|
4651
4663
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
4652
4664
|
/**
|
|
@@ -4699,7 +4711,7 @@ type BaseRecommendIndexSettings = {
|
|
|
4699
4711
|
*/
|
|
4700
4712
|
maxValuesPerFacet?: number | undefined;
|
|
4701
4713
|
/**
|
|
4702
|
-
* 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
|
|
4714
|
+
* 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).
|
|
4703
4715
|
*/
|
|
4704
4716
|
sortFacetValuesBy?: string | undefined;
|
|
4705
4717
|
/**
|
|
@@ -4708,7 +4720,7 @@ type BaseRecommendIndexSettings = {
|
|
|
4708
4720
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
4709
4721
|
renderingContent?: RenderingContent | undefined;
|
|
4710
4722
|
/**
|
|
4711
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
4723
|
+
* 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.
|
|
4712
4724
|
*/
|
|
4713
4725
|
enableReRanking?: boolean | undefined;
|
|
4714
4726
|
reRankingApplyFilter?: ReRankingApplyFilter | null | undefined;
|
|
@@ -4747,6 +4759,8 @@ type BaseRecommendRequest = {
|
|
|
4747
4759
|
queryParameters?: RecommendSearchParams | undefined;
|
|
4748
4760
|
};
|
|
4749
4761
|
|
|
4762
|
+
type FallbackParams = RecommendSearchParams & Record<string, unknown>;
|
|
4763
|
+
|
|
4750
4764
|
/**
|
|
4751
4765
|
* Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`.
|
|
4752
4766
|
*/
|
|
@@ -4758,12 +4772,11 @@ type FrequentlyBoughtTogether = {
|
|
|
4758
4772
|
* Unique record identifier.
|
|
4759
4773
|
*/
|
|
4760
4774
|
objectID: string;
|
|
4775
|
+
fallbackParameters?: FallbackParams | undefined;
|
|
4761
4776
|
};
|
|
4762
4777
|
|
|
4763
4778
|
type BoughtTogetherQuery = BaseRecommendRequest & FrequentlyBoughtTogether;
|
|
4764
4779
|
|
|
4765
|
-
type FallbackParams = RecommendSearchParams & Record<string, unknown>;
|
|
4766
|
-
|
|
4767
4780
|
/**
|
|
4768
4781
|
* Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index.
|
|
4769
4782
|
*/
|
|
@@ -4849,7 +4862,7 @@ type GetRecommendationsParams = {
|
|
|
4849
4862
|
*/
|
|
4850
4863
|
type Exhaustive = {
|
|
4851
4864
|
/**
|
|
4852
|
-
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/
|
|
4865
|
+
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
4853
4866
|
*/
|
|
4854
4867
|
facetsCount?: boolean | undefined;
|
|
4855
4868
|
/**
|
|
@@ -4917,7 +4930,7 @@ type RedirectRuleIndexMetadata = {
|
|
|
4917
4930
|
};
|
|
4918
4931
|
|
|
4919
4932
|
/**
|
|
4920
|
-
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects
|
|
4933
|
+
* [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.
|
|
4921
4934
|
*/
|
|
4922
4935
|
type Redirect = {
|
|
4923
4936
|
index?: Array<RedirectRuleIndexMetadata> | undefined;
|
|
@@ -5018,7 +5031,7 @@ type BaseSearchResponse = Record<string, any> & {
|
|
|
5018
5031
|
*/
|
|
5019
5032
|
userData?: any | null | undefined;
|
|
5020
5033
|
/**
|
|
5021
|
-
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics
|
|
5034
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics).
|
|
5022
5035
|
*/
|
|
5023
5036
|
queryID?: string | undefined;
|
|
5024
5037
|
/**
|
|
@@ -5260,7 +5273,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
5260
5273
|
*/
|
|
5261
5274
|
similarQuery?: string | undefined;
|
|
5262
5275
|
/**
|
|
5263
|
-
* 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
|
|
5276
|
+
* 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).
|
|
5264
5277
|
*/
|
|
5265
5278
|
filters?: string | undefined;
|
|
5266
5279
|
facetFilters?: FacetFilters | undefined;
|
|
@@ -5327,7 +5340,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
5327
5340
|
*/
|
|
5328
5341
|
personalizationImpact?: number | undefined;
|
|
5329
5342
|
/**
|
|
5330
|
-
* 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
|
|
5343
|
+
* 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).
|
|
5331
5344
|
*/
|
|
5332
5345
|
userToken?: string | undefined;
|
|
5333
5346
|
/**
|
|
@@ -5339,7 +5352,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
5339
5352
|
*/
|
|
5340
5353
|
synonyms?: boolean | undefined;
|
|
5341
5354
|
/**
|
|
5342
|
-
* 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
|
|
5355
|
+
* 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/doc/guides/sending-events/getting-started).
|
|
5343
5356
|
*/
|
|
5344
5357
|
clickAnalytics?: boolean | undefined;
|
|
5345
5358
|
/**
|
|
@@ -5347,7 +5360,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
5347
5360
|
*/
|
|
5348
5361
|
analytics?: boolean | undefined;
|
|
5349
5362
|
/**
|
|
5350
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
5363
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
5351
5364
|
*/
|
|
5352
5365
|
analyticsTags?: Array<string> | undefined;
|
|
5353
5366
|
/**
|
|
@@ -5383,7 +5396,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
5383
5396
|
*/
|
|
5384
5397
|
attributesToRetrieve?: Array<string> | undefined;
|
|
5385
5398
|
/**
|
|
5386
|
-
* 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
|
|
5399
|
+
* 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).
|
|
5387
5400
|
*/
|
|
5388
5401
|
ranking?: Array<string> | undefined;
|
|
5389
5402
|
/**
|
|
@@ -5391,7 +5404,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
5391
5404
|
*/
|
|
5392
5405
|
relevancyStrictness?: number | undefined;
|
|
5393
5406
|
/**
|
|
5394
|
-
* 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
|
|
5407
|
+
* 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).
|
|
5395
5408
|
*/
|
|
5396
5409
|
attributesToHighlight?: Array<string> | undefined;
|
|
5397
5410
|
/**
|
|
@@ -5432,13 +5445,13 @@ type IndexSettingsAsSearchParams = {
|
|
|
5432
5445
|
*/
|
|
5433
5446
|
allowTyposOnNumericTokens?: boolean | undefined;
|
|
5434
5447
|
/**
|
|
5435
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
5448
|
+
* 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.
|
|
5436
5449
|
*/
|
|
5437
5450
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
5438
5451
|
ignorePlurals?: IgnorePlurals | undefined;
|
|
5439
5452
|
removeStopWords?: RemoveStopWords | undefined;
|
|
5440
5453
|
/**
|
|
5441
|
-
* 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
|
|
5454
|
+
* 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).
|
|
5442
5455
|
*/
|
|
5443
5456
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
5444
5457
|
/**
|
|
@@ -5493,7 +5506,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
5493
5506
|
*/
|
|
5494
5507
|
maxValuesPerFacet?: number | undefined;
|
|
5495
5508
|
/**
|
|
5496
|
-
* 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
|
|
5509
|
+
* 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).
|
|
5497
5510
|
*/
|
|
5498
5511
|
sortFacetValuesBy?: string | undefined;
|
|
5499
5512
|
/**
|
|
@@ -5502,7 +5515,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
5502
5515
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
5503
5516
|
renderingContent?: RenderingContent | undefined;
|
|
5504
5517
|
/**
|
|
5505
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
5518
|
+
* 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.
|
|
5506
5519
|
*/
|
|
5507
5520
|
enableReRanking?: boolean | undefined;
|
|
5508
5521
|
reRankingApplyFilter?: ReRankingApplyFilter | null | undefined;
|
|
@@ -5568,7 +5581,7 @@ type FacetHits = {
|
|
|
5568
5581
|
*/
|
|
5569
5582
|
highlighted: string;
|
|
5570
5583
|
/**
|
|
5571
|
-
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/
|
|
5584
|
+
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
5572
5585
|
*/
|
|
5573
5586
|
count: number;
|
|
5574
5587
|
};
|
|
@@ -5579,7 +5592,7 @@ type SearchForFacetValuesResponse$1 = {
|
|
|
5579
5592
|
*/
|
|
5580
5593
|
facetHits: Array<FacetHits>;
|
|
5581
5594
|
/**
|
|
5582
|
-
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/
|
|
5595
|
+
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
5583
5596
|
*/
|
|
5584
5597
|
exhaustiveFacetsCount: boolean;
|
|
5585
5598
|
/**
|
|
@@ -6679,6 +6692,21 @@ declare type InsightsOption = {
|
|
|
6679
6692
|
interface AutocompleteOptions<TItem extends BaseItem> extends AutocompleteOptions$1<TItem>, InsightsOption {
|
|
6680
6693
|
}
|
|
6681
6694
|
|
|
6695
|
+
interface DocSearchModalShortcuts {
|
|
6696
|
+
/**
|
|
6697
|
+
* Enable/disable the Ctrl/Cmd+K shortcut to toggle the DocSearch modal.
|
|
6698
|
+
*
|
|
6699
|
+
* @default true
|
|
6700
|
+
*/
|
|
6701
|
+
'Ctrl/Cmd+K'?: boolean;
|
|
6702
|
+
/**
|
|
6703
|
+
* Enable/disable the / shortcut to open the DocSearch modal.
|
|
6704
|
+
*
|
|
6705
|
+
* @default true
|
|
6706
|
+
*/
|
|
6707
|
+
'/'?: boolean;
|
|
6708
|
+
}
|
|
6709
|
+
|
|
6682
6710
|
// ==================================================================================================
|
|
6683
6711
|
// JSON Schema Draft 07
|
|
6684
6712
|
// ==================================================================================================
|
|
@@ -8362,21 +8390,6 @@ type InternalDocSearchHit = DocSearchHit & {
|
|
|
8362
8390
|
__docsearch_parent: InternalDocSearchHit | null;
|
|
8363
8391
|
};
|
|
8364
8392
|
|
|
8365
|
-
interface KeyboardShortcuts {
|
|
8366
|
-
/**
|
|
8367
|
-
* Enable/disable the Ctrl/Cmd+K shortcut to toggle the search modal.
|
|
8368
|
-
*
|
|
8369
|
-
* @default true
|
|
8370
|
-
*/
|
|
8371
|
-
'Ctrl/Cmd+K'?: boolean;
|
|
8372
|
-
/**
|
|
8373
|
-
* Enable/disable the / shortcut to open the search modal.
|
|
8374
|
-
*
|
|
8375
|
-
* @default true
|
|
8376
|
-
*/
|
|
8377
|
-
'/'?: boolean;
|
|
8378
|
-
}
|
|
8379
|
-
|
|
8380
8393
|
type StoredDocSearchHit = Omit<DocSearchHit, '_highlightResult' | '_snippetResult'>;
|
|
8381
8394
|
|
|
8382
8395
|
type DocSearchTranslations = Partial<{
|
|
@@ -8550,8 +8563,10 @@ interface DocSearchProps$1 {
|
|
|
8550
8563
|
recentSearchesWithFavoritesLimit?: number;
|
|
8551
8564
|
/**
|
|
8552
8565
|
* Configuration for keyboard shortcuts. Allows enabling/disabling specific shortcuts.
|
|
8566
|
+
*
|
|
8567
|
+
* @default `{ 'Ctrl/Cmd+K': true, '/': true }`
|
|
8553
8568
|
*/
|
|
8554
|
-
keyboardShortcuts?:
|
|
8569
|
+
keyboardShortcuts?: DocSearchModalShortcuts;
|
|
8555
8570
|
}
|
|
8556
8571
|
|
|
8557
8572
|
type ButtonTranslations = Partial<{
|
|
@@ -8610,6 +8625,18 @@ type AskAiScreenTranslations = Partial<{
|
|
|
8610
8625
|
* Message that's shown when user has stopped the streaming of a message.
|
|
8611
8626
|
*/
|
|
8612
8627
|
stoppedStreamingText: string;
|
|
8628
|
+
/**
|
|
8629
|
+
* Error title shown if there is an error while chatting.
|
|
8630
|
+
*/
|
|
8631
|
+
errorTitleText: string;
|
|
8632
|
+
/**
|
|
8633
|
+
* Message shown when thread depth limit is exceeded (AI-217 error).
|
|
8634
|
+
*/
|
|
8635
|
+
threadDepthExceededMessage: string;
|
|
8636
|
+
/**
|
|
8637
|
+
* Button text for starting a new conversation after thread depth error.
|
|
8638
|
+
*/
|
|
8639
|
+
startNewConversationButtonText: string;
|
|
8613
8640
|
}>;
|
|
8614
8641
|
|
|
8615
8642
|
type ErrorScreenTranslations = Partial<{
|
|
@@ -8666,6 +8693,7 @@ type SearchBoxTranslations = Partial<{
|
|
|
8666
8693
|
conversationHistoryTitle: string;
|
|
8667
8694
|
startNewConversationText: string;
|
|
8668
8695
|
viewConversationHistoryText: string;
|
|
8696
|
+
threadDepthErrorPlaceholder: string;
|
|
8669
8697
|
}>;
|
|
8670
8698
|
|
|
8671
8699
|
type ModalTranslations = Partial<{
|
|
@@ -8674,7 +8702,36 @@ type ModalTranslations = Partial<{
|
|
|
8674
8702
|
footer: FooterTranslations;
|
|
8675
8703
|
}> & ScreenStateTranslations;
|
|
8676
8704
|
|
|
8677
|
-
|
|
8705
|
+
/**
|
|
8706
|
+
* Instance returned by docsearch() for programmatic control.
|
|
8707
|
+
*/
|
|
8708
|
+
interface DocSearchInstance {
|
|
8709
|
+
/** Returns true once the component is mounted and ready. */
|
|
8710
|
+
readonly isReady: boolean;
|
|
8711
|
+
/** Returns true if the modal is currently open. */
|
|
8712
|
+
readonly isOpen: boolean;
|
|
8713
|
+
/** Opens the search modal. */
|
|
8714
|
+
open(): void;
|
|
8715
|
+
/** Closes the search modal. */
|
|
8716
|
+
close(): void;
|
|
8717
|
+
/** Opens Ask AI mode (modal). */
|
|
8718
|
+
openAskAi(initialMessage?: InitialAskAiMessage): void;
|
|
8719
|
+
/** Unmounts the DocSearch component and cleans up. */
|
|
8720
|
+
destroy(): void;
|
|
8721
|
+
}
|
|
8722
|
+
/**
|
|
8723
|
+
* Lifecycle callbacks for the DocSearch instance.
|
|
8724
|
+
*/
|
|
8725
|
+
interface DocSearchCallbacks {
|
|
8726
|
+
/** Called once DocSearch is mounted and ready for interaction. */
|
|
8727
|
+
onReady?: () => void;
|
|
8728
|
+
/** Called when the modal opens. */
|
|
8729
|
+
onOpen?: () => void;
|
|
8730
|
+
/** Called when the modal closes. */
|
|
8731
|
+
onClose?: () => void;
|
|
8732
|
+
interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void;
|
|
8733
|
+
}
|
|
8734
|
+
type DocSearchProps = DocSearchCallbacks & Omit<DocSearchProps$1, 'onSidepanelClose' | 'onSidepanelOpen'> & {
|
|
8678
8735
|
container: HTMLElement | string;
|
|
8679
8736
|
environment?: typeof window;
|
|
8680
8737
|
};
|
|
@@ -8682,7 +8739,7 @@ declare const html: (strings: TemplateStringsArray, ...values: unknown[]) => JSX
|
|
|
8682
8739
|
type TemplateHelpers = Record<string, unknown> & {
|
|
8683
8740
|
html: typeof html;
|
|
8684
8741
|
};
|
|
8685
|
-
declare function docsearch(allProps: DocSearchProps):
|
|
8742
|
+
declare function docsearch(allProps: DocSearchProps): DocSearchInstance;
|
|
8686
8743
|
|
|
8687
8744
|
export { docsearch as default };
|
|
8688
|
-
export type { DocSearchProps, TemplateHelpers };
|
|
8745
|
+
export type { DocSearchCallbacks, DocSearchInstance, DocSearchProps, TemplateHelpers };
|