@algolia/recommend 5.7.0 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/browser.d.ts +558 -504
- package/dist/builds/browser.js +11 -21
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +2 -2
- package/dist/builds/fetch.js +8 -18
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +8 -18
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +9 -19
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +557 -502
- package/dist/node.d.cts +557 -502
- package/dist/node.d.ts +557 -502
- package/dist/src/recommendClient.cjs +7 -17
- package/dist/src/recommendClient.cjs.map +1 -1
- package/dist/src/recommendClient.js +7 -17
- package/dist/src/recommendClient.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -2
- package/model/alternativesAsExact.ts +1 -1
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundRadius.ts +1 -1
- package/model/banner.ts +13 -0
- package/model/bannerImage.ts +12 -0
- package/model/bannerImageUrl.ts +8 -0
- package/model/bannerLink.ts +8 -0
- package/model/baseIndexSettings.ts +15 -15
- package/model/baseRecommendIndexSettings.ts +14 -14
- package/model/baseRecommendSearchParams.ts +8 -8
- package/model/baseSearchResponse.ts +2 -2
- package/model/booleanString.ts +1 -1
- package/model/clientMethodProps.ts +10 -8
- package/model/consequence.ts +2 -2
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +1 -1
- package/model/getRecommendationsParams.ts +1 -1
- package/model/getRecommendationsResponse.ts +1 -1
- package/model/highlightResult.ts +1 -1
- package/model/highlightResultOption.ts +1 -1
- package/model/ignorePlurals.ts +1 -1
- package/model/index.ts +15 -10
- package/model/indexSettingsFacets.ts +1 -1
- package/model/matchLevel.ts +1 -1
- package/model/numericFilters.ts +2 -2
- package/model/optionalFilters.ts +1 -1
- package/model/paramsConsequence.ts +2 -2
- package/model/queryType.ts +2 -2
- package/model/reRankingApplyFilter.ts +1 -1
- package/model/recommendHit.ts +2 -2
- package/model/recommendModels.ts +1 -1
- package/model/recommendRule.ts +1 -1
- package/model/recommendSearchParams.ts +1 -1
- package/model/recommendationsHit.ts +1 -0
- package/model/recommendationsHits.ts +1 -1
- package/model/recommendationsRequest.ts +5 -3
- package/model/recommendationsResults.ts +1 -1
- package/model/redirect.ts +1 -1
- package/model/removeStopWords.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +4 -1
- package/model/searchRecommendRulesParams.ts +1 -1
- package/model/searchRecommendRulesResponse.ts +1 -1
- package/model/snippetResult.ts +1 -1
- package/model/sortRemainingBy.ts +1 -1
- package/model/supportedLanguage.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +1 -1
- package/model/typoTolerance.ts +2 -2
- package/model/value.ts +2 -2
- package/model/widgets.ts +13 -0
- package/package.json +6 -6
|
@@ -4,14 +4,14 @@ import type { SupportedLanguage } from './supportedLanguage';
|
|
|
4
4
|
|
|
5
5
|
export type BaseIndexSettings = {
|
|
6
6
|
/**
|
|
7
|
-
* 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
|
|
7
|
+
* 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))`.
|
|
8
8
|
*/
|
|
9
|
-
attributesForFaceting?: string
|
|
9
|
+
attributesForFaceting?: Array<string>;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* 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
|
|
12
|
+
* 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/).
|
|
13
13
|
*/
|
|
14
|
-
replicas?: string
|
|
14
|
+
replicas?: Array<string>;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can\'t be guaranteed.
|
|
@@ -21,22 +21,22 @@ export type BaseIndexSettings = {
|
|
|
21
21
|
/**
|
|
22
22
|
* 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.
|
|
23
23
|
*/
|
|
24
|
-
unretrievableAttributes?: string
|
|
24
|
+
unretrievableAttributes?: Array<string>;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). 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.
|
|
28
28
|
*/
|
|
29
|
-
disableTypoToleranceOnWords?: string
|
|
29
|
+
disableTypoToleranceOnWords?: Array<string>;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
|
|
33
33
|
*/
|
|
34
|
-
attributesToTransliterate?: string
|
|
34
|
+
attributesToTransliterate?: Array<string>;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
|
|
38
38
|
*/
|
|
39
|
-
camelCaseAttributes?: string
|
|
39
|
+
camelCaseAttributes?: Array<string>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* 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).
|
|
@@ -46,12 +46,12 @@ export type BaseIndexSettings = {
|
|
|
46
46
|
/**
|
|
47
47
|
* 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/).
|
|
48
48
|
*/
|
|
49
|
-
indexLanguages?: SupportedLanguage
|
|
49
|
+
indexLanguages?: Array<SupportedLanguage>;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). Attribute names are case-sensitive.
|
|
53
53
|
*/
|
|
54
|
-
disablePrefixOnAttributes?: string
|
|
54
|
+
disablePrefixOnAttributes?: Array<string>;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
|
@@ -59,9 +59,9 @@ export type BaseIndexSettings = {
|
|
|
59
59
|
allowCompressionOfIntegerArray?: boolean;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes.
|
|
62
|
+
* Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
|
|
63
63
|
*/
|
|
64
|
-
numericAttributesForFiltering?: string
|
|
64
|
+
numericAttributesForFiltering?: Array<string>;
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren\'t indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
|
|
@@ -69,9 +69,9 @@ export type BaseIndexSettings = {
|
|
|
69
69
|
separatorsToIndex?: string;
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* 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 modifier, matches at the beginning of an attribute rank
|
|
72
|
+
* 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.
|
|
73
73
|
*/
|
|
74
|
-
searchableAttributes?: string
|
|
74
|
+
searchableAttributes?: Array<string>;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* An object with custom data. You can store up to 32kB as custom data.
|
|
@@ -81,7 +81,7 @@ export type BaseIndexSettings = {
|
|
|
81
81
|
/**
|
|
82
82
|
* 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/).
|
|
83
83
|
*/
|
|
84
|
-
customNormalization?:
|
|
84
|
+
customNormalization?: { [key: string]: { [key: string]: string } };
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
|
|
@@ -17,12 +17,12 @@ export type BaseRecommendIndexSettings = {
|
|
|
17
17
|
/**
|
|
18
18
|
* Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
19
19
|
*/
|
|
20
|
-
attributesToRetrieve?: string
|
|
20
|
+
attributesToRetrieve?: Array<string>;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* 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/).
|
|
24
24
|
*/
|
|
25
|
-
ranking?: string
|
|
25
|
+
ranking?: Array<string>;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
|
|
@@ -32,12 +32,12 @@ export type BaseRecommendIndexSettings = {
|
|
|
32
32
|
/**
|
|
33
33
|
* 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/).
|
|
34
34
|
*/
|
|
35
|
-
attributesToHighlight?: string
|
|
35
|
+
attributesToHighlight?: Array<string>;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Attributes for which to enable snippets. Attribute names are case-sensitive. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted.
|
|
39
39
|
*/
|
|
40
|
-
attributesToSnippet?: string
|
|
40
|
+
attributesToSnippet?: Array<string>;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
|
@@ -79,7 +79,7 @@ export type BaseRecommendIndexSettings = {
|
|
|
79
79
|
/**
|
|
80
80
|
* 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.
|
|
81
81
|
*/
|
|
82
|
-
disableTypoToleranceOnAttributes?: string
|
|
82
|
+
disableTypoToleranceOnAttributes?: Array<string>;
|
|
83
83
|
|
|
84
84
|
ignorePlurals?: IgnorePlurals;
|
|
85
85
|
|
|
@@ -88,7 +88,7 @@ export type BaseRecommendIndexSettings = {
|
|
|
88
88
|
/**
|
|
89
89
|
* 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/).
|
|
90
90
|
*/
|
|
91
|
-
queryLanguages?: SupportedLanguage
|
|
91
|
+
queryLanguages?: Array<SupportedLanguage>;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* Whether to split compound words in the query into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. 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).
|
|
@@ -115,31 +115,31 @@ export type BaseRecommendIndexSettings = {
|
|
|
115
115
|
advancedSyntax?: boolean;
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words
|
|
118
|
+
* Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
|
|
119
119
|
*/
|
|
120
|
-
optionalWords?: string
|
|
120
|
+
optionalWords?: Array<string>;
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the
|
|
123
|
+
* Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
|
|
124
124
|
*/
|
|
125
|
-
disableExactOnAttributes?: string
|
|
125
|
+
disableExactOnAttributes?: Array<string>;
|
|
126
126
|
|
|
127
127
|
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
|
|
131
131
|
*/
|
|
132
|
-
alternativesAsExact?: AlternativesAsExact
|
|
132
|
+
alternativesAsExact?: Array<AlternativesAsExact>;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
|
|
136
136
|
*/
|
|
137
|
-
advancedSyntaxFeatures?: AdvancedSyntaxFeatures
|
|
137
|
+
advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures>;
|
|
138
138
|
|
|
139
139
|
distinct?: Distinct;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all
|
|
142
|
+
* Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response.
|
|
143
143
|
*/
|
|
144
144
|
replaceSynonymsInHighlight?: boolean;
|
|
145
145
|
|
|
@@ -151,7 +151,7 @@ export type BaseRecommendIndexSettings = {
|
|
|
151
151
|
/**
|
|
152
152
|
* Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI.
|
|
153
153
|
*/
|
|
154
|
-
responseFields?: string
|
|
154
|
+
responseFields?: Array<string>;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
@@ -35,12 +35,12 @@ export type BaseRecommendSearchParams = {
|
|
|
35
35
|
/**
|
|
36
36
|
* Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
|
|
37
37
|
*/
|
|
38
|
-
restrictSearchableAttributes?: string
|
|
38
|
+
restrictSearchableAttributes?: Array<string>;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
|
|
42
42
|
*/
|
|
43
|
-
facets?: string
|
|
43
|
+
facets?: Array<string>;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
|
|
@@ -48,7 +48,7 @@ export type BaseRecommendSearchParams = {
|
|
|
48
48
|
facetingAfterDistinct?: boolean;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
|
51
|
+
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
|
52
52
|
*/
|
|
53
53
|
aroundLatLng?: string;
|
|
54
54
|
|
|
@@ -69,22 +69,22 @@ export type BaseRecommendSearchParams = {
|
|
|
69
69
|
/**
|
|
70
70
|
* Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
|
|
71
71
|
*/
|
|
72
|
-
insideBoundingBox?: number
|
|
72
|
+
insideBoundingBox?: Array<Array<number>>;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
|
|
76
76
|
*/
|
|
77
|
-
insidePolygon?: number
|
|
77
|
+
insidePolygon?: Array<Array<number>>;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
|
|
81
81
|
*/
|
|
82
|
-
naturalLanguages?: SupportedLanguage
|
|
82
|
+
naturalLanguages?: Array<SupportedLanguage>;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
|
|
86
86
|
*/
|
|
87
|
-
ruleContexts?: string
|
|
87
|
+
ruleContexts?: Array<string>;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
|
|
@@ -119,7 +119,7 @@ export type BaseRecommendSearchParams = {
|
|
|
119
119
|
/**
|
|
120
120
|
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
121
121
|
*/
|
|
122
|
-
analyticsTags?: string
|
|
122
|
+
analyticsTags?: Array<string>;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* Whether to include this search when calculating processing-time percentiles.
|
|
@@ -46,12 +46,12 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
46
46
|
/**
|
|
47
47
|
* Facet counts.
|
|
48
48
|
*/
|
|
49
|
-
facets?:
|
|
49
|
+
facets?: { [key: string]: { [key: string]: number } };
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Statistics for numerical facets.
|
|
53
53
|
*/
|
|
54
|
-
facets_stats?:
|
|
54
|
+
facets_stats?: { [key: string]: FacetStats };
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Index name used for the query.
|
package/model/booleanString.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
export type BooleanString = '
|
|
3
|
+
export type BooleanString = 'true' | 'false';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { RecommendModels } from '../model/recommendModels';
|
|
4
|
+
import { RecommendRule } from '../model/recommendRule';
|
|
5
|
+
|
|
6
|
+
import { SearchRecommendRulesParams } from '../model/searchRecommendRulesParams';
|
|
7
|
+
|
|
5
8
|
import type { RecommendationsRequest } from './recommendationsRequest';
|
|
6
|
-
import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Properties for the `batchRecommendRules` method.
|
|
@@ -17,7 +19,7 @@ export type BatchRecommendRulesProps = {
|
|
|
17
19
|
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
18
20
|
*/
|
|
19
21
|
model: RecommendModels;
|
|
20
|
-
recommendRule?: RecommendRule
|
|
22
|
+
recommendRule?: Array<RecommendRule>;
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
/**
|
|
@@ -31,7 +33,7 @@ export type CustomDeleteProps = {
|
|
|
31
33
|
/**
|
|
32
34
|
* Query parameters to apply to the current query.
|
|
33
35
|
*/
|
|
34
|
-
parameters?:
|
|
36
|
+
parameters?: { [key: string]: any };
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
/**
|
|
@@ -45,7 +47,7 @@ export type CustomGetProps = {
|
|
|
45
47
|
/**
|
|
46
48
|
* Query parameters to apply to the current query.
|
|
47
49
|
*/
|
|
48
|
-
parameters?:
|
|
50
|
+
parameters?: { [key: string]: any };
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
/**
|
|
@@ -59,7 +61,7 @@ export type CustomPostProps = {
|
|
|
59
61
|
/**
|
|
60
62
|
* Query parameters to apply to the current query.
|
|
61
63
|
*/
|
|
62
|
-
parameters?:
|
|
64
|
+
parameters?: { [key: string]: any };
|
|
63
65
|
/**
|
|
64
66
|
* Parameters to send with the custom request.
|
|
65
67
|
*/
|
|
@@ -77,7 +79,7 @@ export type CustomPutProps = {
|
|
|
77
79
|
/**
|
|
78
80
|
* Query parameters to apply to the current query.
|
|
79
81
|
*/
|
|
80
|
-
parameters?:
|
|
82
|
+
parameters?: { [key: string]: any };
|
|
81
83
|
/**
|
|
82
84
|
* Parameters to send with the custom request.
|
|
83
85
|
*/
|
package/model/consequence.ts
CHANGED
|
@@ -11,12 +11,12 @@ export type Consequence = {
|
|
|
11
11
|
/**
|
|
12
12
|
* Exclude items from recommendations.
|
|
13
13
|
*/
|
|
14
|
-
hide?: HideConsequenceObject
|
|
14
|
+
hide?: Array<HideConsequenceObject>;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Place items at specific positions in the list of recommendations.
|
|
18
18
|
*/
|
|
19
|
-
promote?: PromoteConsequenceObject
|
|
19
|
+
promote?: Array<PromoteConsequenceObject>;
|
|
20
20
|
|
|
21
21
|
params?: ParamsConsequence;
|
|
22
22
|
};
|
package/model/facetFilters.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it\'s best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`.
|
|
5
5
|
*/
|
|
6
|
-
export type FacetFilters = FacetFilters
|
|
6
|
+
export type FacetFilters = Array<FacetFilters> | string;
|
package/model/facetOrdering.ts
CHANGED
package/model/highlightResult.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
import type { HighlightResultOption } from './highlightResultOption';
|
|
4
4
|
|
|
5
|
-
export type HighlightResult =
|
|
5
|
+
export type HighlightResult = HighlightResultOption | { [key: string]: HighlightResult } | Array<HighlightResult>;
|
package/model/ignorePlurals.ts
CHANGED
|
@@ -6,4 +6,4 @@ import type { SupportedLanguage } from './supportedLanguage';
|
|
|
6
6
|
/**
|
|
7
7
|
* Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index.
|
|
8
8
|
*/
|
|
9
|
-
export type IgnorePlurals =
|
|
9
|
+
export type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
|
package/model/index.ts
CHANGED
|
@@ -6,6 +6,10 @@ export * from './aroundPrecision';
|
|
|
6
6
|
export * from './aroundRadius';
|
|
7
7
|
export * from './aroundRadiusAll';
|
|
8
8
|
export * from './autoFacetFilter';
|
|
9
|
+
export * from './banner';
|
|
10
|
+
export * from './bannerImage';
|
|
11
|
+
export * from './bannerImageUrl';
|
|
12
|
+
export * from './bannerLink';
|
|
9
13
|
export * from './baseIndexSettings';
|
|
10
14
|
export * from './baseRecommendIndexSettings';
|
|
11
15
|
export * from './baseRecommendRequest';
|
|
@@ -13,6 +17,7 @@ export * from './baseRecommendSearchParams';
|
|
|
13
17
|
export * from './baseSearchResponse';
|
|
14
18
|
export * from './booleanString';
|
|
15
19
|
export * from './boughtTogetherQuery';
|
|
20
|
+
export * from './clientMethodProps';
|
|
16
21
|
export * from './condition';
|
|
17
22
|
export * from './consequence';
|
|
18
23
|
export * from './deletedAtResponse';
|
|
@@ -26,9 +31,9 @@ export * from './facetStats';
|
|
|
26
31
|
export * from './fallbackParams';
|
|
27
32
|
export * from './fbtModel';
|
|
28
33
|
export * from './frequentlyBoughtTogether';
|
|
29
|
-
export * from './getRecommendTaskResponse';
|
|
30
34
|
export * from './getRecommendationsParams';
|
|
31
35
|
export * from './getRecommendationsResponse';
|
|
36
|
+
export * from './getRecommendTaskResponse';
|
|
32
37
|
export * from './hideConsequenceObject';
|
|
33
38
|
export * from './highlightResult';
|
|
34
39
|
export * from './highlightResultOption';
|
|
@@ -37,8 +42,8 @@ export * from './indexSettingsFacets';
|
|
|
37
42
|
export * from './lookingSimilar';
|
|
38
43
|
export * from './lookingSimilarModel';
|
|
39
44
|
export * from './lookingSimilarQuery';
|
|
40
|
-
export * from './matchLevel';
|
|
41
45
|
export * from './matchedGeoLocation';
|
|
46
|
+
export * from './matchLevel';
|
|
42
47
|
export * from './numericFilters';
|
|
43
48
|
export * from './optionalFilters';
|
|
44
49
|
export * from './paramsConsequence';
|
|
@@ -47,13 +52,6 @@ export * from './promoteConsequenceObject';
|
|
|
47
52
|
export * from './queryType';
|
|
48
53
|
export * from './range';
|
|
49
54
|
export * from './rankingInfo';
|
|
50
|
-
export * from './reRankingApplyFilter';
|
|
51
|
-
export * from './recommendHit';
|
|
52
|
-
export * from './recommendIndexSettings';
|
|
53
|
-
export * from './recommendModels';
|
|
54
|
-
export * from './recommendRule';
|
|
55
|
-
export * from './recommendSearchParams';
|
|
56
|
-
export * from './recommendUpdatedAtResponse';
|
|
57
55
|
export * from './recommendationsHit';
|
|
58
56
|
export * from './recommendationsHits';
|
|
59
57
|
export * from './recommendationsRequest';
|
|
@@ -61,6 +59,12 @@ export * from './recommendationsResults';
|
|
|
61
59
|
export * from './recommendedForYou';
|
|
62
60
|
export * from './recommendedForYouModel';
|
|
63
61
|
export * from './recommendedForYouQuery';
|
|
62
|
+
export * from './recommendHit';
|
|
63
|
+
export * from './recommendIndexSettings';
|
|
64
|
+
export * from './recommendModels';
|
|
65
|
+
export * from './recommendRule';
|
|
66
|
+
export * from './recommendSearchParams';
|
|
67
|
+
export * from './recommendUpdatedAtResponse';
|
|
64
68
|
export * from './redirect';
|
|
65
69
|
export * from './redirectRuleIndexData';
|
|
66
70
|
export * from './redirectRuleIndexMetadata';
|
|
@@ -71,6 +75,7 @@ export * from './relatedQuery';
|
|
|
71
75
|
export * from './removeStopWords';
|
|
72
76
|
export * from './removeWordsIfNoResults';
|
|
73
77
|
export * from './renderingContent';
|
|
78
|
+
export * from './reRankingApplyFilter';
|
|
74
79
|
export * from './ruleMetadata';
|
|
75
80
|
export * from './searchPagination';
|
|
76
81
|
export * from './searchParamsQuery';
|
|
@@ -93,4 +98,4 @@ export * from './trendingItemsQuery';
|
|
|
93
98
|
export * from './typoTolerance';
|
|
94
99
|
export * from './typoToleranceEnum';
|
|
95
100
|
export * from './value';
|
|
96
|
-
export * from './
|
|
101
|
+
export * from './widgets';
|
package/model/matchLevel.ts
CHANGED
package/model/numericFilters.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.
|
|
4
|
+
* Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
|
|
5
5
|
*/
|
|
6
|
-
export type NumericFilters = NumericFilters
|
|
6
|
+
export type NumericFilters = Array<NumericFilters> | string;
|
package/model/optionalFilters.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* 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 don\'t work with numeric attributes.
|
|
5
5
|
*/
|
|
6
|
-
export type OptionalFilters = OptionalFilters
|
|
6
|
+
export type OptionalFilters = Array<OptionalFilters> | string;
|
|
@@ -9,7 +9,7 @@ export type ParamsConsequence = {
|
|
|
9
9
|
/**
|
|
10
10
|
* Filter recommendations that match or don\'t match the same `facet:facet_value` combination as the viewed item.
|
|
11
11
|
*/
|
|
12
|
-
automaticFacetFilters?: AutoFacetFilter
|
|
12
|
+
automaticFacetFilters?: Array<AutoFacetFilter>;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 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/).
|
|
@@ -19,5 +19,5 @@ export type ParamsConsequence = {
|
|
|
19
19
|
/**
|
|
20
20
|
* 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. Matches with higher weights (`<score=N>`) rank before matches with lower weights. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match.
|
|
21
21
|
*/
|
|
22
|
-
optionalFilters?: string
|
|
22
|
+
optionalFilters?: Array<string>;
|
|
23
23
|
};
|
package/model/queryType.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as 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/).
|
|
4
|
+
* 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/).
|
|
5
5
|
*/
|
|
6
|
-
export type QueryType = '
|
|
6
|
+
export type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
|
|
5
5
|
*/
|
|
6
|
-
export type ReRankingApplyFilter = ReRankingApplyFilter
|
|
6
|
+
export type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
package/model/recommendHit.ts
CHANGED
|
@@ -16,12 +16,12 @@ export type RecommendHit = Record<string, any> & {
|
|
|
16
16
|
/**
|
|
17
17
|
* Surround words that match the query with HTML tags for highlighting.
|
|
18
18
|
*/
|
|
19
|
-
_highlightResult?:
|
|
19
|
+
_highlightResult?: { [key: string]: HighlightResult };
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Snippets that show the context around a matching search query.
|
|
23
23
|
*/
|
|
24
|
-
_snippetResult?:
|
|
24
|
+
_snippetResult?: { [key: string]: SnippetResult };
|
|
25
25
|
|
|
26
26
|
_rankingInfo?: RankingInfo;
|
|
27
27
|
|
package/model/recommendModels.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
export type RecommendModels = '
|
|
3
|
+
export type RecommendModels = 'related-products' | 'bought-together' | 'trending-facets' | 'trending-items';
|
package/model/recommendRule.ts
CHANGED