@algolia/recommend 5.0.0-alpha.106 → 5.0.0-alpha.107
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/model/anchoring.d.ts +1 -1
- package/dist/model/aroundPrecision.d.ts +1 -1
- package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
- package/dist/model/aroundRadius.d.ts +1 -1
- package/dist/model/aroundRadiusAll.d.ts +3 -0
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/automaticFacetFilter.d.ts +4 -4
- package/dist/model/automaticFacetFilters.d.ts +1 -1
- package/dist/model/baseRecommendRequest.d.ts +1 -1
- package/dist/model/baseRecommendationsQuery.d.ts +1 -1
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +24 -28
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +6 -6
- package/dist/model/clientMethodProps.d.ts +6 -6
- package/dist/model/condition.d.ts +7 -3
- package/dist/model/condition.d.ts.map +1 -1
- package/dist/model/consequence.d.ts +5 -5
- package/dist/model/consequenceHide.d.ts +2 -2
- package/dist/model/consequenceQuery.d.ts +1 -1
- package/dist/model/consequenceQueryObject.d.ts +2 -2
- package/dist/model/deletedAtResponse.d.ts +1 -1
- package/dist/model/distinct.d.ts +1 -1
- package/dist/model/edit.d.ts +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
- package/dist/model/facetFilters.d.ts +1 -1
- package/dist/model/facetOrdering.d.ts +2 -2
- package/dist/model/facets.d.ts +2 -2
- package/dist/model/highlightResultOption.d.ts +3 -3
- package/dist/model/ignorePlurals.d.ts +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +30 -34
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/matchLevel.d.ts +1 -1
- package/dist/model/mode.d.ts +1 -1
- package/dist/model/numericFilters.d.ts +1 -1
- package/dist/model/optionalFilters.d.ts +1 -1
- package/dist/model/params.d.ts +1 -1
- package/dist/model/promoteObjectID.d.ts +2 -2
- package/dist/model/promoteObjectIDs.d.ts +2 -2
- package/dist/model/queryType.d.ts +1 -1
- package/dist/model/rankingInfo.d.ts +10 -7
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts +1 -1
- package/dist/model/recommendHit.d.ts +3 -3
- package/dist/model/recommendationsHits.d.ts +1 -1
- package/dist/model/removeStopWords.d.ts +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts +1 -1
- package/dist/model/renderingContent.d.ts +1 -1
- package/dist/model/searchParamsQuery.d.ts +1 -1
- package/dist/model/searchRecommendRulesParams.d.ts +2 -2
- package/dist/model/searchRecommendRulesResponse.d.ts +3 -3
- package/dist/model/semanticSearch.d.ts +2 -2
- package/dist/model/snippetResultOption.d.ts +2 -2
- package/dist/model/sortRemainingBy.d.ts +1 -1
- package/dist/model/tagFilters.d.ts +1 -1
- package/dist/model/taskStatus.d.ts +1 -1
- package/dist/model/typoTolerance.d.ts +1 -1
- package/dist/model/typoToleranceEnum.d.ts +3 -0
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/value.d.ts +1 -1
- package/dist/recommend.cjs +7 -7
- package/dist/recommend.esm.browser.js +7 -7
- package/dist/recommend.esm.node.js +7 -7
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +7 -7
- package/model/anchoring.ts +1 -1
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundPrecisionFromValueInner.ts +9 -0
- package/model/aroundRadius.ts +1 -1
- package/model/aroundRadiusAll.ts +3 -0
- package/model/automaticFacetFilter.ts +4 -4
- package/model/automaticFacetFilters.ts +1 -1
- package/model/baseRecommendRequest.ts +1 -1
- package/model/baseRecommendationsQuery.ts +1 -1
- package/model/baseRecommendedForYouQueryParameters.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +24 -29
- package/model/baseSearchResponse.ts +6 -6
- package/model/clientMethodProps.ts +6 -6
- package/model/condition.ts +8 -3
- package/model/consequence.ts +5 -5
- package/model/consequenceHide.ts +2 -2
- package/model/consequenceQuery.ts +1 -1
- package/model/consequenceQueryObject.ts +2 -2
- package/model/deletedAtResponse.ts +1 -1
- package/model/distinct.ts +1 -1
- package/model/edit.ts +1 -1
- package/model/exactOnSingleWordQuery.ts +1 -1
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +2 -2
- package/model/facets.ts +2 -2
- package/model/highlightResultOption.ts +3 -3
- package/model/ignorePlurals.ts +1 -1
- package/model/indexSettingsAsSearchParams.ts +30 -35
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/numericFilters.ts +1 -1
- package/model/optionalFilters.ts +1 -1
- package/model/params.ts +1 -1
- package/model/promoteObjectID.ts +2 -2
- package/model/promoteObjectIDs.ts +2 -2
- package/model/queryType.ts +1 -1
- package/model/rankingInfo.ts +10 -7
- package/model/reRankingApplyFilter.ts +1 -1
- package/model/recommendHit.ts +3 -3
- package/model/recommendationsHits.ts +1 -1
- package/model/removeStopWords.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +1 -1
- package/model/searchParamsQuery.ts +1 -1
- package/model/searchRecommendRulesParams.ts +2 -2
- package/model/searchRecommendRulesResponse.ts +3 -3
- package/model/semanticSearch.ts +2 -2
- package/model/snippetResultOption.ts +2 -2
- package/model/sortRemainingBy.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +1 -1
- package/model/typoTolerance.ts +1 -1
- package/model/typoToleranceEnum.ts +3 -0
- package/model/value.ts +1 -1
- package/package.json +7 -7
|
@@ -22,7 +22,7 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
22
22
|
aroundLatLng?: string;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Distance from a central coordinate provided by `aroundLatLng`.
|
|
26
26
|
*/
|
|
27
27
|
automaticRadius?: string;
|
|
28
28
|
|
|
@@ -44,7 +44,7 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
44
44
|
exhaustiveTypo?: boolean;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Facet counts.
|
|
48
48
|
*/
|
|
49
49
|
facets?: Record<string, Record<string, number>>;
|
|
50
50
|
|
|
@@ -74,12 +74,12 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
74
74
|
message?: string;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Number of hits
|
|
77
|
+
* Number of results (hits).
|
|
78
78
|
*/
|
|
79
79
|
nbHits: number;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Number of pages of results
|
|
82
|
+
* Number of pages of results.
|
|
83
83
|
*/
|
|
84
84
|
nbPages: number;
|
|
85
85
|
|
|
@@ -89,7 +89,7 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
89
89
|
nbSortedHits?: number;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* Page
|
|
92
|
+
* Page of search results to retrieve.
|
|
93
93
|
*/
|
|
94
94
|
page: number;
|
|
95
95
|
|
|
@@ -128,7 +128,7 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
128
128
|
serverUsed?: string;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* An object with custom data. You can store up to 32 kB as custom data.
|
|
132
132
|
*/
|
|
133
133
|
userData?: any | null;
|
|
134
134
|
|
|
@@ -72,7 +72,7 @@ export type CustomPutProps = {
|
|
|
72
72
|
*/
|
|
73
73
|
export type DeleteRecommendRuleProps = {
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Name of the index on which to perform the operation.
|
|
76
76
|
*/
|
|
77
77
|
indexName: string;
|
|
78
78
|
/**
|
|
@@ -80,7 +80,7 @@ export type DeleteRecommendRuleProps = {
|
|
|
80
80
|
*/
|
|
81
81
|
model: RecommendModels;
|
|
82
82
|
/**
|
|
83
|
-
* Unique record
|
|
83
|
+
* Unique record identifier.
|
|
84
84
|
*/
|
|
85
85
|
objectID: string;
|
|
86
86
|
};
|
|
@@ -90,7 +90,7 @@ export type DeleteRecommendRuleProps = {
|
|
|
90
90
|
*/
|
|
91
91
|
export type GetRecommendRuleProps = {
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Name of the index on which to perform the operation.
|
|
94
94
|
*/
|
|
95
95
|
indexName: string;
|
|
96
96
|
/**
|
|
@@ -98,7 +98,7 @@ export type GetRecommendRuleProps = {
|
|
|
98
98
|
*/
|
|
99
99
|
model: RecommendModels;
|
|
100
100
|
/**
|
|
101
|
-
* Unique record
|
|
101
|
+
* Unique record identifier.
|
|
102
102
|
*/
|
|
103
103
|
objectID: string;
|
|
104
104
|
};
|
|
@@ -108,7 +108,7 @@ export type GetRecommendRuleProps = {
|
|
|
108
108
|
*/
|
|
109
109
|
export type GetRecommendStatusProps = {
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Name of the index on which to perform the operation.
|
|
112
112
|
*/
|
|
113
113
|
indexName: string;
|
|
114
114
|
/**
|
|
@@ -126,7 +126,7 @@ export type GetRecommendStatusProps = {
|
|
|
126
126
|
*/
|
|
127
127
|
export type SearchRecommendRulesProps = {
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* Name of the index on which to perform the operation.
|
|
130
130
|
*/
|
|
131
131
|
indexName: string;
|
|
132
132
|
/**
|
package/model/condition.ts
CHANGED
|
@@ -4,19 +4,24 @@ import type { Anchoring } from './anchoring';
|
|
|
4
4
|
|
|
5
5
|
export type Condition = {
|
|
6
6
|
/**
|
|
7
|
-
* Query pattern
|
|
7
|
+
* Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".
|
|
8
8
|
*/
|
|
9
9
|
pattern?: string;
|
|
10
10
|
|
|
11
11
|
anchoring?: Anchoring;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Whether the pattern
|
|
14
|
+
* Whether the pattern should match plurals, synonyms, and typos.
|
|
15
15
|
*/
|
|
16
16
|
alternatives?: boolean;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
|
|
20
20
|
*/
|
|
21
21
|
context?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
|
|
25
|
+
*/
|
|
26
|
+
filters?: string;
|
|
22
27
|
};
|
package/model/consequence.ts
CHANGED
|
@@ -5,28 +5,28 @@ import type { ConsequenceParams } from './consequenceParams';
|
|
|
5
5
|
import type { Promote } from './promote';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences)
|
|
8
|
+
* Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
|
|
9
9
|
*/
|
|
10
10
|
export type Consequence = {
|
|
11
11
|
params?: ConsequenceParams;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Records to promote.
|
|
14
|
+
* Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
|
|
15
15
|
*/
|
|
16
16
|
promote?: Promote[];
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
|
|
20
20
|
*/
|
|
21
21
|
filterPromotes?: boolean;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Records
|
|
24
|
+
* Records you want to hide from the search results.
|
|
25
25
|
*/
|
|
26
26
|
hide?: ConsequenceHide[];
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1 kB of minified JSON.
|
|
30
30
|
*/
|
|
31
31
|
userData?: any | null;
|
|
32
32
|
};
|
package/model/consequenceHide.ts
CHANGED
|
@@ -1,11 +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
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Object ID of the record to hide.
|
|
5
5
|
*/
|
|
6
6
|
export type ConsequenceHide = {
|
|
7
7
|
/**
|
|
8
|
-
* Unique
|
|
8
|
+
* Unique record identifier.
|
|
9
9
|
*/
|
|
10
10
|
objectID: string;
|
|
11
11
|
};
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { ConsequenceQueryObject } from './consequenceQueryObject';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Replace or edit the search query. If `consequenceQuery` is a string, the entire search query is replaced with that string. If `consequenceQuery` is an object, it describes incremental edits made to the query.
|
|
7
7
|
*/
|
|
8
8
|
export type ConsequenceQuery = ConsequenceQueryObject | string;
|
|
@@ -4,12 +4,12 @@ import type { Edit } from './edit';
|
|
|
4
4
|
|
|
5
5
|
export type ConsequenceQueryObject = {
|
|
6
6
|
/**
|
|
7
|
-
* Words to remove.
|
|
7
|
+
* Words to remove from the search query.
|
|
8
8
|
*/
|
|
9
9
|
remove?: string[];
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Changes to make to the search query.
|
|
13
13
|
*/
|
|
14
14
|
edits?: Edit[];
|
|
15
15
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type DeletedAtResponse = {
|
|
7
7
|
/**
|
|
8
|
-
* Unique identifier of a task.
|
|
8
|
+
* 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](#tag/Indices/operation/getTask) and this `taskID`.
|
|
9
9
|
*/
|
|
10
10
|
taskID: number;
|
|
11
11
|
|
package/model/distinct.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
|
-
*
|
|
4
|
+
* Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set.
|
|
5
5
|
*/
|
|
6
6
|
export type Distinct = boolean | number;
|
package/model/edit.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 how 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) is computed when the query
|
|
4
|
+
* Determines how 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) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t.
|
|
5
5
|
*/
|
|
6
6
|
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
|
package/model/facetFilters.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 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`.
|
|
7
7
|
*/
|
|
8
8
|
export type FacetFilters = MixedSearchFilters[] | string;
|
package/model/facetOrdering.ts
CHANGED
|
@@ -4,13 +4,13 @@ import type { Facets } from './facets';
|
|
|
4
4
|
import type { Value } from './value';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Order of facet names and facet values in your UI.
|
|
8
8
|
*/
|
|
9
9
|
export type FacetOrdering = {
|
|
10
10
|
facets?: Facets;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Order of facet values. One object for each facet.
|
|
14
14
|
*/
|
|
15
15
|
values?: Record<string, Value>;
|
|
16
16
|
};
|
package/model/facets.ts
CHANGED
|
@@ -1,11 +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
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Order of facet names.
|
|
5
5
|
*/
|
|
6
6
|
export type Facets = {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
9
9
|
*/
|
|
10
10
|
order?: string[];
|
|
11
11
|
};
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
import type { MatchLevel } from './matchLevel';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Surround words that match the query with HTML tags for highlighting.
|
|
7
7
|
*/
|
|
8
8
|
export type HighlightResultOption = {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Highlighted attribute value, including HTML tags.
|
|
11
11
|
*/
|
|
12
12
|
value: string;
|
|
13
13
|
|
|
14
14
|
matchLevel: MatchLevel;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* List of words from the query
|
|
17
|
+
* List of matched words from the search query.
|
|
18
18
|
*/
|
|
19
19
|
matchedWords: string[];
|
|
20
20
|
|
package/model/ignorePlurals.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
|
-
*
|
|
4
|
+
* Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index.
|
|
5
5
|
*/
|
|
6
6
|
export type IgnorePlurals = string[] | boolean;
|
|
@@ -16,47 +16,42 @@ import type { TypoTolerance } from './typoTolerance';
|
|
|
16
16
|
|
|
17
17
|
export type IndexSettingsAsSearchParams = {
|
|
18
18
|
/**
|
|
19
|
-
* Attributes
|
|
20
|
-
*/
|
|
21
|
-
attributesForFaceting?: string[];
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.
|
|
19
|
+
* Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` 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.
|
|
25
20
|
*/
|
|
26
21
|
attributesToRetrieve?: string[];
|
|
27
22
|
|
|
28
23
|
/**
|
|
29
|
-
* Determines the order in which Algolia
|
|
24
|
+
* 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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> 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/).
|
|
30
25
|
*/
|
|
31
26
|
ranking?: string[];
|
|
32
27
|
|
|
33
28
|
/**
|
|
34
|
-
*
|
|
29
|
+
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). 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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> 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.
|
|
35
30
|
*/
|
|
36
31
|
customRanking?: string[];
|
|
37
32
|
|
|
38
33
|
/**
|
|
39
|
-
* Relevancy threshold below which less relevant results aren\'t included in the results.
|
|
34
|
+
* 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.
|
|
40
35
|
*/
|
|
41
36
|
relevancyStrictness?: number;
|
|
42
37
|
|
|
43
38
|
/**
|
|
44
|
-
* Attributes to highlight.
|
|
39
|
+
* Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. 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/).
|
|
45
40
|
*/
|
|
46
41
|
attributesToHighlight?: string[];
|
|
47
42
|
|
|
48
43
|
/**
|
|
49
|
-
* Attributes to
|
|
44
|
+
* Attributes for which to enable snippets. 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.
|
|
50
45
|
*/
|
|
51
46
|
attributesToSnippet?: string[];
|
|
52
47
|
|
|
53
48
|
/**
|
|
54
|
-
* HTML
|
|
49
|
+
* HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
|
55
50
|
*/
|
|
56
51
|
highlightPreTag?: string;
|
|
57
52
|
|
|
58
53
|
/**
|
|
59
|
-
* HTML
|
|
54
|
+
* HTML tag to insert after the highlighted parts in all highlighted results and snippets.
|
|
60
55
|
*/
|
|
61
56
|
highlightPostTag?: string;
|
|
62
57
|
|
|
@@ -66,7 +61,7 @@ export type IndexSettingsAsSearchParams = {
|
|
|
66
61
|
snippetEllipsisText?: string;
|
|
67
62
|
|
|
68
63
|
/**
|
|
69
|
-
*
|
|
64
|
+
* Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
|
|
70
65
|
*/
|
|
71
66
|
restrictHighlightAndSnippetArrays?: boolean;
|
|
72
67
|
|
|
@@ -76,24 +71,24 @@ export type IndexSettingsAsSearchParams = {
|
|
|
76
71
|
hitsPerPage?: number;
|
|
77
72
|
|
|
78
73
|
/**
|
|
79
|
-
* Minimum number of characters a word in the query
|
|
74
|
+
* Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
|
|
80
75
|
*/
|
|
81
76
|
minWordSizefor1Typo?: number;
|
|
82
77
|
|
|
83
78
|
/**
|
|
84
|
-
* Minimum number of characters a word in the query
|
|
79
|
+
* Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
|
|
85
80
|
*/
|
|
86
81
|
minWordSizefor2Typos?: number;
|
|
87
82
|
|
|
88
83
|
typoTolerance?: TypoTolerance;
|
|
89
84
|
|
|
90
85
|
/**
|
|
91
|
-
* Whether to allow typos on numbers
|
|
86
|
+
* Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers.
|
|
92
87
|
*/
|
|
93
88
|
allowTyposOnNumericTokens?: boolean;
|
|
94
89
|
|
|
95
90
|
/**
|
|
96
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
|
|
91
|
+
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). 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.
|
|
97
92
|
*/
|
|
98
93
|
disableTypoToleranceOnAttributes?: string[];
|
|
99
94
|
|
|
@@ -102,27 +97,27 @@ export type IndexSettingsAsSearchParams = {
|
|
|
102
97
|
removeStopWords?: RemoveStopWords;
|
|
103
98
|
|
|
104
99
|
/**
|
|
105
|
-
* Characters
|
|
100
|
+
* Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
|
|
106
101
|
*/
|
|
107
102
|
keepDiacriticsOnCharacters?: string;
|
|
108
103
|
|
|
109
104
|
/**
|
|
110
|
-
*
|
|
105
|
+
* [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, 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/).
|
|
111
106
|
*/
|
|
112
107
|
queryLanguages?: string[];
|
|
113
108
|
|
|
114
109
|
/**
|
|
115
|
-
*
|
|
110
|
+
* Whether to split compound words 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.
|
|
116
111
|
*/
|
|
117
112
|
decompoundQuery?: boolean;
|
|
118
113
|
|
|
119
114
|
/**
|
|
120
|
-
*
|
|
115
|
+
* Whether to enable rules.
|
|
121
116
|
*/
|
|
122
117
|
enableRules?: boolean;
|
|
123
118
|
|
|
124
119
|
/**
|
|
125
|
-
*
|
|
120
|
+
* Whether to enable Personalization.
|
|
126
121
|
*/
|
|
127
122
|
enablePersonalization?: boolean;
|
|
128
123
|
|
|
@@ -135,51 +130,51 @@ export type IndexSettingsAsSearchParams = {
|
|
|
135
130
|
semanticSearch?: SemanticSearch;
|
|
136
131
|
|
|
137
132
|
/**
|
|
138
|
-
*
|
|
133
|
+
* Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
|
139
134
|
*/
|
|
140
135
|
advancedSyntax?: boolean;
|
|
141
136
|
|
|
142
137
|
/**
|
|
143
|
-
* Words
|
|
138
|
+
* 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 dividied 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).
|
|
144
139
|
*/
|
|
145
140
|
optionalWords?: string[];
|
|
146
141
|
|
|
147
142
|
/**
|
|
148
|
-
*
|
|
143
|
+
* 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). This can be useful for attributes with long values, where the likelyhood 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.
|
|
149
144
|
*/
|
|
150
145
|
disableExactOnAttributes?: string[];
|
|
151
146
|
|
|
152
147
|
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
|
|
153
148
|
|
|
154
149
|
/**
|
|
155
|
-
* Alternatives that should be considered
|
|
150
|
+
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
|
|
156
151
|
*/
|
|
157
152
|
alternativesAsExact?: AlternativesAsExact[];
|
|
158
153
|
|
|
159
154
|
/**
|
|
160
|
-
*
|
|
155
|
+
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
|
|
161
156
|
*/
|
|
162
157
|
advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
|
|
163
158
|
|
|
164
159
|
distinct?: Distinct;
|
|
165
160
|
|
|
166
161
|
/**
|
|
167
|
-
* Whether to
|
|
162
|
+
* 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 occurences of \"house\" are replaced by \"home\" in the highlighted response.
|
|
168
163
|
*/
|
|
169
164
|
replaceSynonymsInHighlight?: boolean;
|
|
170
165
|
|
|
171
166
|
/**
|
|
172
|
-
*
|
|
167
|
+
* Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
|
|
173
168
|
*/
|
|
174
169
|
minProximity?: number;
|
|
175
170
|
|
|
176
171
|
/**
|
|
177
|
-
*
|
|
172
|
+
* 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.
|
|
178
173
|
*/
|
|
179
174
|
responseFields?: string[];
|
|
180
175
|
|
|
181
176
|
/**
|
|
182
|
-
* Maximum number of facet
|
|
177
|
+
* 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).
|
|
183
178
|
*/
|
|
184
179
|
maxFacetHits?: number;
|
|
185
180
|
|
|
@@ -189,19 +184,19 @@ export type IndexSettingsAsSearchParams = {
|
|
|
189
184
|
maxValuesPerFacet?: number;
|
|
190
185
|
|
|
191
186
|
/**
|
|
192
|
-
*
|
|
187
|
+
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> 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/).
|
|
193
188
|
*/
|
|
194
189
|
sortFacetValuesBy?: string;
|
|
195
190
|
|
|
196
191
|
/**
|
|
197
|
-
*
|
|
192
|
+
* Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.
|
|
198
193
|
*/
|
|
199
194
|
attributeCriteriaComputedByMinProximity?: boolean;
|
|
200
195
|
|
|
201
196
|
renderingContent?: RenderingContent;
|
|
202
197
|
|
|
203
198
|
/**
|
|
204
|
-
*
|
|
199
|
+
* 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.
|
|
205
200
|
*/
|
|
206
201
|
enableReRanking?: boolean;
|
|
207
202
|
|
package/model/matchLevel.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
|
-
*
|
|
4
|
+
* Whether the whole query string matches or only a part.
|
|
5
5
|
*/
|
|
6
6
|
export type MatchLevel = 'full' | 'none' | 'partial';
|
package/model/mode.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
|
-
* Search mode the index will use to query for results.
|
|
4
|
+
* Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
|
|
5
5
|
*/
|
|
6
6
|
export type Mode = 'keywordSearch' | 'neuralSearch';
|
package/model/numericFilters.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 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: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions 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`.
|
|
7
7
|
*/
|
|
8
8
|
export type NumericFilters = MixedSearchFilters[] | string;
|
package/model/optionalFilters.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 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.
|
|
7
7
|
*/
|
|
8
8
|
export type OptionalFilters = MixedSearchFilters[] | string;
|
package/model/params.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { ConsequenceQuery } from './consequenceQuery';
|
|
|
5
5
|
import type { RenderingContent } from './renderingContent';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`.
|
|
9
9
|
*/
|
|
10
10
|
export type Params = {
|
|
11
11
|
query?: ConsequenceQuery;
|