@algolia/client-search 5.6.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/browser.d.ts +1671 -1651
- package/dist/builds/browser.js +94 -156
- 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 +94 -156
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +89 -151
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +95 -157
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +1424 -1403
- package/dist/node.d.cts +1424 -1403
- package/dist/node.d.ts +1424 -1403
- package/dist/src/searchClient.cjs +87 -149
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +90 -152
- package/dist/src/searchClient.js.map +1 -1
- package/index.js +1 -1
- package/model/acl.ts +1 -1
- package/model/action.ts +4 -4
- package/model/alternativesAsExact.ts +1 -1
- package/model/anchoring.ts +2 -2
- package/model/apiKey.ts +4 -4
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundRadius.ts +1 -1
- package/model/attributeToUpdate.ts +1 -1
- package/model/automaticFacetFilters.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/banners.ts +10 -0
- package/model/baseIndexSettings.ts +15 -15
- package/model/baseSearchParams.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +8 -8
- package/model/baseSearchResponse.ts +2 -2
- package/model/batchAssignUserIdsParams.ts +1 -1
- package/model/batchDictionaryEntriesParams.ts +1 -1
- package/model/batchParams.ts +1 -1
- package/model/batchResponse.ts +1 -1
- package/model/batchWriteParams.ts +1 -1
- package/model/booleanString.ts +1 -1
- package/model/browseParams.ts +2 -1
- package/model/browseParamsObject.ts +1 -1
- package/model/browseResponse.ts +1 -1
- package/model/builtInOperationType.ts +4 -4
- package/model/builtInOperationValue.ts +1 -1
- package/model/clientMethodProps.ts +50 -34
- package/model/consequence.ts +2 -2
- package/model/consequenceQueryObject.ts +2 -2
- package/model/deleteByParams.ts +3 -3
- package/model/dictionaryEntry.ts +2 -2
- package/model/dictionaryEntryState.ts +1 -1
- package/model/dictionaryType.ts +1 -1
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +1 -1
- package/model/facets.ts +1 -1
- package/model/fetchedIndex.ts +1 -1
- package/model/getApiKeyResponse.ts +1 -1
- package/model/getLogsResponse.ts +1 -1
- package/model/getObjectsParams.ts +1 -1
- package/model/getObjectsRequest.ts +1 -1
- package/model/getTopUserIdsResponse.ts +1 -1
- package/model/hasPendingMappingsResponse.ts +1 -1
- package/model/highlightResult.ts +1 -1
- package/model/highlightResultOption.ts +1 -1
- package/model/hit.ts +2 -2
- package/model/ignorePlurals.ts +1 -1
- package/model/index.ts +13 -7
- package/model/indexSettingsAsSearchParams.ts +15 -15
- package/model/listApiKeysResponse.ts +1 -1
- package/model/listClustersResponse.ts +1 -1
- package/model/listIndicesResponse.ts +1 -1
- package/model/listUserIdsResponse.ts +1 -1
- package/model/log.ts +1 -1
- package/model/logType.ts +1 -1
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/multipleBatchResponse.ts +2 -2
- package/model/numericFilters.ts +2 -2
- package/model/operationIndexParams.ts +1 -1
- package/model/operationType.ts +1 -1
- package/model/optionalFilters.ts +1 -1
- package/model/promote.ts +1 -1
- package/model/promoteObjectIDs.ts +1 -1
- package/model/queryType.ts +2 -2
- package/model/reRankingApplyFilter.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/replaceAllObjectsResponse.ts +1 -1
- package/model/rule.ts +2 -2
- package/model/scopeType.ts +1 -1
- package/model/searchDictionaryEntriesResponse.ts +1 -1
- package/model/searchForFacetValuesResponse.ts +1 -1
- package/model/searchForFacets.ts +1 -1
- package/model/searchForHits.ts +1 -1
- package/model/searchHits.ts +1 -1
- package/model/searchMethodParams.ts +1 -1
- package/model/searchParams.ts +1 -1
- package/model/searchQuery.ts +1 -1
- package/model/searchResponse.ts +1 -1
- package/model/searchResponses.ts +1 -1
- package/model/searchResult.ts +1 -1
- package/model/searchRulesResponse.ts +1 -1
- package/model/searchSynonymsResponse.ts +1 -1
- package/model/searchUserIdsParams.ts +1 -1
- package/model/searchUserIdsResponse.ts +2 -2
- package/model/securedApiKeyRestrictions.ts +1 -1
- package/model/semanticSearch.ts +1 -1
- package/model/snippetResult.ts +1 -1
- package/model/sortRemainingBy.ts +1 -1
- package/model/standardEntries.ts +3 -3
- package/model/supportedLanguage.ts +1 -1
- package/model/synonymHit.ts +3 -3
- package/model/synonymType.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +1 -1
- package/model/typoTolerance.ts +2 -2
- package/model/userHit.ts +1 -1
- package/model/value.ts +2 -2
- package/model/widgets.ts +10 -0
- package/package.json +7 -7
package/dist/fetch.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
2
|
import { CreateIterablePromise, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Access control list permissions.
|
|
6
|
-
*/
|
|
7
|
-
type Acl = 'addObject' | 'analytics' | 'browse' | 'deleteIndex' | 'deleteObject' | 'editSettings' | 'inference' | 'listIndexes' | 'logs' | 'personalization' | 'recommendation' | 'search' | 'seeUnretrievableAttributes' | 'settings' | 'usage';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Type of indexing operation.
|
|
11
|
-
*/
|
|
12
|
-
type Action = 'addObject' | 'clear' | 'delete' | 'deleteObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'updateObject';
|
|
13
|
-
|
|
14
4
|
type AddApiKeyResponse = {
|
|
15
5
|
/**
|
|
16
6
|
* API key.
|
|
@@ -22,14 +12,10 @@ type AddApiKeyResponse = {
|
|
|
22
12
|
createdAt: string;
|
|
23
13
|
};
|
|
24
14
|
|
|
25
|
-
type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
|
|
26
|
-
|
|
27
|
-
type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym';
|
|
28
|
-
|
|
29
15
|
/**
|
|
30
|
-
*
|
|
16
|
+
* Access control list permissions.
|
|
31
17
|
*/
|
|
32
|
-
type
|
|
18
|
+
type Acl = 'addObject' | 'analytics' | 'browse' | 'deleteObject' | 'deleteIndex' | 'editSettings' | 'inference' | 'listIndexes' | 'logs' | 'personalization' | 'recommendation' | 'search' | 'seeUnretrievableAttributes' | 'settings' | 'usage';
|
|
33
19
|
|
|
34
20
|
/**
|
|
35
21
|
* API key object.
|
|
@@ -38,7 +24,7 @@ type ApiKey = {
|
|
|
38
24
|
/**
|
|
39
25
|
* Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint\'s reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
|
|
40
26
|
*/
|
|
41
|
-
acl: Acl
|
|
27
|
+
acl: Array<Acl>;
|
|
42
28
|
/**
|
|
43
29
|
* Description of an API key to help you identify this API key.
|
|
44
30
|
*/
|
|
@@ -46,7 +32,7 @@ type ApiKey = {
|
|
|
46
32
|
/**
|
|
47
33
|
* Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
|
|
48
34
|
*/
|
|
49
|
-
indexes?: string
|
|
35
|
+
indexes?: Array<string>;
|
|
50
36
|
/**
|
|
51
37
|
* Maximum number of results this API key can retrieve in one query. By default, there\'s no limit.
|
|
52
38
|
*/
|
|
@@ -56,697 +42,1141 @@ type ApiKey = {
|
|
|
56
42
|
*/
|
|
57
43
|
maxQueriesPerIPPerHour?: number;
|
|
58
44
|
/**
|
|
59
|
-
* Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address
|
|
45
|
+
* Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
|
|
60
46
|
*/
|
|
61
47
|
queryParameters?: string;
|
|
62
48
|
/**
|
|
63
49
|
* Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
|
|
64
50
|
*/
|
|
65
|
-
referers?: string
|
|
51
|
+
referers?: Array<string>;
|
|
66
52
|
/**
|
|
67
53
|
* Duration (in seconds) after which the API key expires. By default, API keys don\'t expire.
|
|
68
54
|
*/
|
|
69
55
|
validity?: number;
|
|
70
56
|
};
|
|
71
57
|
|
|
72
|
-
type ApiKeyOperation = 'add' | 'delete' | 'update';
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Range object with lower and upper values in meters to define custom ranges.
|
|
76
|
-
*/
|
|
77
|
-
type Range = {
|
|
78
|
-
/**
|
|
79
|
-
* Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
80
|
-
*/
|
|
81
|
-
from?: number;
|
|
82
|
-
/**
|
|
83
|
-
* Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
84
|
-
*/
|
|
85
|
-
value?: number;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
|
|
90
|
-
*/
|
|
91
|
-
type AroundPrecision = Range[] | number;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
|
|
95
|
-
*/
|
|
96
|
-
type AroundRadiusAll = 'all';
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
|
|
100
|
-
*/
|
|
101
|
-
type AroundRadius = AroundRadiusAll | number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Assign userID parameters.
|
|
105
|
-
*/
|
|
106
|
-
type AssignUserIdParams = {
|
|
107
|
-
/**
|
|
108
|
-
* Cluster name.
|
|
109
|
-
*/
|
|
110
|
-
cluster: string;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* How to change the attribute.
|
|
115
|
-
*/
|
|
116
|
-
type BuiltInOperationType = 'Add' | 'AddUnique' | 'Decrement' | 'Increment' | 'IncrementFrom' | 'IncrementSet' | 'Remove';
|
|
117
|
-
|
|
118
|
-
type BuiltInOperationValue = number | string;
|
|
119
|
-
|
|
120
58
|
/**
|
|
121
|
-
*
|
|
59
|
+
* Type of indexing operation.
|
|
122
60
|
*/
|
|
123
|
-
type
|
|
124
|
-
_operation: BuiltInOperationType;
|
|
125
|
-
value: BuiltInOperationValue;
|
|
126
|
-
};
|
|
61
|
+
type Action = 'addObject' | 'updateObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'deleteObject' | 'delete' | 'clear';
|
|
127
62
|
|
|
128
|
-
type
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Filter or optional filter to be applied to the search.
|
|
132
|
-
*/
|
|
133
|
-
type AutomaticFacetFilter = {
|
|
134
|
-
/**
|
|
135
|
-
* Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.
|
|
136
|
-
*/
|
|
137
|
-
facet: string;
|
|
63
|
+
type MultipleBatchRequest = {
|
|
64
|
+
action: Action;
|
|
138
65
|
/**
|
|
139
|
-
*
|
|
66
|
+
* Operation arguments (varies with specified `action`).
|
|
140
67
|
*/
|
|
141
|
-
|
|
68
|
+
body?: Record<string, unknown>;
|
|
142
69
|
/**
|
|
143
|
-
*
|
|
70
|
+
* Index name (case-sensitive).
|
|
144
71
|
*/
|
|
145
|
-
|
|
72
|
+
indexName: string;
|
|
146
73
|
};
|
|
147
74
|
|
|
148
75
|
/**
|
|
149
|
-
*
|
|
76
|
+
* Batch parameters.
|
|
150
77
|
*/
|
|
151
|
-
type
|
|
78
|
+
type BatchParams = {
|
|
79
|
+
requests: Array<MultipleBatchRequest>;
|
|
80
|
+
};
|
|
152
81
|
|
|
153
|
-
type
|
|
82
|
+
type BatchResponse = {
|
|
154
83
|
/**
|
|
155
|
-
* API
|
|
84
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
|
|
156
85
|
*/
|
|
157
|
-
|
|
86
|
+
taskID: number;
|
|
158
87
|
/**
|
|
159
|
-
*
|
|
88
|
+
* Unique record identifiers.
|
|
160
89
|
*/
|
|
161
|
-
|
|
90
|
+
objectIDs: Array<string>;
|
|
162
91
|
};
|
|
163
92
|
|
|
164
93
|
/**
|
|
165
|
-
*
|
|
94
|
+
* Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
|
|
166
95
|
*/
|
|
167
|
-
type
|
|
168
|
-
|
|
169
|
-
type BaseIndexSettings = {
|
|
96
|
+
type Exhaustive = {
|
|
170
97
|
/**
|
|
171
|
-
*
|
|
98
|
+
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
|
|
172
99
|
*/
|
|
173
|
-
|
|
100
|
+
facetsCount?: boolean;
|
|
174
101
|
/**
|
|
175
|
-
*
|
|
102
|
+
* The value is `false` if not all facet values are retrieved.
|
|
176
103
|
*/
|
|
177
|
-
|
|
104
|
+
facetValues?: boolean;
|
|
178
105
|
/**
|
|
179
|
-
*
|
|
106
|
+
* Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
|
|
180
107
|
*/
|
|
181
|
-
|
|
108
|
+
nbHits?: boolean;
|
|
182
109
|
/**
|
|
183
|
-
*
|
|
110
|
+
* Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
|
|
184
111
|
*/
|
|
185
|
-
|
|
112
|
+
rulesMatch?: boolean;
|
|
186
113
|
/**
|
|
187
|
-
*
|
|
114
|
+
* Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
|
|
188
115
|
*/
|
|
189
|
-
|
|
116
|
+
typo?: boolean;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
type FacetStats = {
|
|
190
120
|
/**
|
|
191
|
-
*
|
|
121
|
+
* Minimum value in the results.
|
|
192
122
|
*/
|
|
193
|
-
|
|
123
|
+
min?: number;
|
|
194
124
|
/**
|
|
195
|
-
*
|
|
125
|
+
* Maximum value in the results.
|
|
196
126
|
*/
|
|
197
|
-
|
|
127
|
+
max?: number;
|
|
198
128
|
/**
|
|
199
|
-
*
|
|
129
|
+
* Average facet value in the results.
|
|
200
130
|
*/
|
|
201
|
-
|
|
131
|
+
avg?: number;
|
|
202
132
|
/**
|
|
203
|
-
*
|
|
133
|
+
* Sum of all values in the results.
|
|
204
134
|
*/
|
|
205
|
-
|
|
135
|
+
sum?: number;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Redirect rule data.
|
|
140
|
+
*/
|
|
141
|
+
type RedirectRuleIndexData = {
|
|
142
|
+
ruleObjectID: string;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
type RedirectRuleIndexMetadata = {
|
|
206
146
|
/**
|
|
207
|
-
*
|
|
147
|
+
* Source index for the redirect rule.
|
|
208
148
|
*/
|
|
209
|
-
|
|
149
|
+
source: string;
|
|
210
150
|
/**
|
|
211
|
-
*
|
|
151
|
+
* Destination index for the redirect rule.
|
|
212
152
|
*/
|
|
213
|
-
|
|
153
|
+
dest: string;
|
|
214
154
|
/**
|
|
215
|
-
*
|
|
155
|
+
* Reason for the redirect rule.
|
|
216
156
|
*/
|
|
217
|
-
|
|
157
|
+
reason: string;
|
|
218
158
|
/**
|
|
219
|
-
*
|
|
159
|
+
* Redirect rule status.
|
|
220
160
|
*/
|
|
221
|
-
|
|
161
|
+
succeed: boolean;
|
|
162
|
+
data: RedirectRuleIndexData;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
|
|
167
|
+
*/
|
|
168
|
+
type Redirect = {
|
|
169
|
+
index?: Array<RedirectRuleIndexMetadata>;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Order of facet names.
|
|
174
|
+
*/
|
|
175
|
+
type Facets = {
|
|
222
176
|
/**
|
|
223
|
-
*
|
|
177
|
+
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
224
178
|
*/
|
|
225
|
-
|
|
179
|
+
order?: Array<string>;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
|
|
184
|
+
*/
|
|
185
|
+
type SortRemainingBy = 'count' | 'alpha' | 'hidden';
|
|
186
|
+
|
|
187
|
+
type Value = {
|
|
226
188
|
/**
|
|
227
|
-
*
|
|
189
|
+
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
228
190
|
*/
|
|
229
|
-
|
|
191
|
+
order?: Array<string>;
|
|
192
|
+
sortRemainingBy?: SortRemainingBy;
|
|
230
193
|
/**
|
|
231
|
-
*
|
|
194
|
+
* Hide facet values.
|
|
232
195
|
*/
|
|
233
|
-
|
|
196
|
+
hide?: Array<string>;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Order of facet names and facet values in your UI.
|
|
201
|
+
*/
|
|
202
|
+
type FacetOrdering = {
|
|
203
|
+
facets?: Facets;
|
|
234
204
|
/**
|
|
235
|
-
*
|
|
205
|
+
* Order of facet values. One object for each facet.
|
|
236
206
|
*/
|
|
237
|
-
|
|
207
|
+
values?: {
|
|
208
|
+
[key: string]: Value;
|
|
209
|
+
};
|
|
238
210
|
};
|
|
239
211
|
|
|
240
212
|
/**
|
|
241
|
-
*
|
|
213
|
+
* The redirect rule container.
|
|
214
|
+
*/
|
|
215
|
+
type RedirectURL = {
|
|
216
|
+
url?: string;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* url for a search banner image.
|
|
242
221
|
*/
|
|
243
|
-
type
|
|
222
|
+
type BannerImageUrl = {
|
|
223
|
+
url?: string;
|
|
224
|
+
};
|
|
244
225
|
|
|
245
226
|
/**
|
|
246
|
-
*
|
|
227
|
+
* image of a search banner.
|
|
247
228
|
*/
|
|
248
|
-
type
|
|
229
|
+
type BannerImage = {
|
|
230
|
+
urls?: BannerImageUrl;
|
|
231
|
+
title?: string;
|
|
232
|
+
};
|
|
249
233
|
|
|
250
234
|
/**
|
|
251
|
-
*
|
|
235
|
+
* link for a banner defined in merchandising studio.
|
|
252
236
|
*/
|
|
253
|
-
type
|
|
237
|
+
type BannerLink = {
|
|
238
|
+
url?: string;
|
|
239
|
+
};
|
|
254
240
|
|
|
255
241
|
/**
|
|
256
|
-
*
|
|
242
|
+
* a search banner with image and url.
|
|
257
243
|
*/
|
|
258
|
-
type
|
|
244
|
+
type Banner = {
|
|
245
|
+
image?: BannerImage;
|
|
246
|
+
link?: BannerLink;
|
|
247
|
+
};
|
|
259
248
|
|
|
260
|
-
|
|
249
|
+
/**
|
|
250
|
+
* banners defined in the merchandising studio for the given search.
|
|
251
|
+
*/
|
|
252
|
+
type Banners = {
|
|
253
|
+
banners?: Banner;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* widgets returned from any rules that are applied to the current search.
|
|
258
|
+
*/
|
|
259
|
+
type Widgets = {
|
|
260
|
+
banners?: Banners;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as the order of facet names and values without changing your frontend code.
|
|
265
|
+
*/
|
|
266
|
+
type RenderingContent = {
|
|
267
|
+
facetOrdering?: FacetOrdering;
|
|
268
|
+
redirect?: RedirectURL;
|
|
269
|
+
widgets?: Widgets;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
type BaseSearchResponse = Record<string, any> & {
|
|
261
273
|
/**
|
|
262
|
-
*
|
|
274
|
+
* A/B test ID. This is only included in the response for indices that are part of an A/B test.
|
|
263
275
|
*/
|
|
264
|
-
|
|
276
|
+
abTestID?: number;
|
|
265
277
|
/**
|
|
266
|
-
*
|
|
278
|
+
* Variant ID. This is only included in the response for indices that are part of an A/B test.
|
|
267
279
|
*/
|
|
268
|
-
|
|
269
|
-
facetFilters?: FacetFilters;
|
|
270
|
-
optionalFilters?: OptionalFilters;
|
|
271
|
-
numericFilters?: NumericFilters;
|
|
272
|
-
tagFilters?: TagFilters;
|
|
280
|
+
abTestVariantID?: number;
|
|
273
281
|
/**
|
|
274
|
-
*
|
|
282
|
+
* Computed geographical location.
|
|
275
283
|
*/
|
|
276
|
-
|
|
284
|
+
aroundLatLng?: string;
|
|
277
285
|
/**
|
|
278
|
-
*
|
|
286
|
+
* Distance from a central coordinate provided by `aroundLatLng`.
|
|
279
287
|
*/
|
|
280
|
-
|
|
288
|
+
automaticRadius?: string;
|
|
289
|
+
exhaustive?: Exhaustive;
|
|
281
290
|
/**
|
|
282
|
-
*
|
|
291
|
+
* See the `facetsCount` field of the `exhaustive` object in the response.
|
|
283
292
|
*/
|
|
284
|
-
|
|
293
|
+
exhaustiveFacetsCount?: boolean;
|
|
285
294
|
/**
|
|
286
|
-
*
|
|
295
|
+
* See the `nbHits` field of the `exhaustive` object in the response.
|
|
287
296
|
*/
|
|
288
|
-
|
|
297
|
+
exhaustiveNbHits?: boolean;
|
|
289
298
|
/**
|
|
290
|
-
*
|
|
299
|
+
* See the `typo` field of the `exhaustive` object in the response.
|
|
291
300
|
*/
|
|
292
|
-
|
|
301
|
+
exhaustiveTypo?: boolean;
|
|
293
302
|
/**
|
|
294
|
-
*
|
|
303
|
+
* Facet counts.
|
|
295
304
|
*/
|
|
296
|
-
|
|
305
|
+
facets?: {
|
|
306
|
+
[key: string]: {
|
|
307
|
+
[key: string]: number;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
297
310
|
/**
|
|
298
|
-
*
|
|
311
|
+
* Statistics for numerical facets.
|
|
299
312
|
*/
|
|
300
|
-
|
|
313
|
+
facets_stats?: {
|
|
314
|
+
[key: string]: FacetStats;
|
|
315
|
+
};
|
|
301
316
|
/**
|
|
302
|
-
*
|
|
317
|
+
* Index name used for the query.
|
|
303
318
|
*/
|
|
304
|
-
|
|
319
|
+
index?: string;
|
|
305
320
|
/**
|
|
306
|
-
*
|
|
321
|
+
* Index name used for the query. During A/B testing, the targeted index isn\'t always the index used by the query.
|
|
307
322
|
*/
|
|
308
|
-
|
|
309
|
-
aroundRadius?: AroundRadius;
|
|
310
|
-
aroundPrecision?: AroundPrecision;
|
|
323
|
+
indexUsed?: string;
|
|
311
324
|
/**
|
|
312
|
-
*
|
|
325
|
+
* Warnings about the query.
|
|
313
326
|
*/
|
|
314
|
-
|
|
327
|
+
message?: string;
|
|
315
328
|
/**
|
|
316
|
-
*
|
|
329
|
+
* Number of hits selected and sorted by the relevant sort algorithm.
|
|
317
330
|
*/
|
|
318
|
-
|
|
331
|
+
nbSortedHits?: number;
|
|
319
332
|
/**
|
|
320
|
-
*
|
|
333
|
+
* Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
|
|
321
334
|
*/
|
|
322
|
-
|
|
335
|
+
parsedQuery?: string;
|
|
323
336
|
/**
|
|
324
|
-
*
|
|
337
|
+
* Time the server took to process the request, in milliseconds.
|
|
325
338
|
*/
|
|
326
|
-
|
|
339
|
+
processingTimeMS: number;
|
|
327
340
|
/**
|
|
328
|
-
*
|
|
341
|
+
* Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
|
|
329
342
|
*/
|
|
330
|
-
|
|
343
|
+
processingTimingsMS?: Record<string, unknown>;
|
|
331
344
|
/**
|
|
332
|
-
*
|
|
345
|
+
* Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
|
|
333
346
|
*/
|
|
334
|
-
|
|
347
|
+
queryAfterRemoval?: string;
|
|
348
|
+
redirect?: Redirect;
|
|
349
|
+
renderingContent?: RenderingContent;
|
|
335
350
|
/**
|
|
336
|
-
*
|
|
351
|
+
* Time the server took to process the request, in milliseconds.
|
|
337
352
|
*/
|
|
338
|
-
|
|
353
|
+
serverTimeMS?: number;
|
|
339
354
|
/**
|
|
340
|
-
*
|
|
355
|
+
* Host name of the server that processed the request.
|
|
341
356
|
*/
|
|
342
|
-
|
|
357
|
+
serverUsed?: string;
|
|
343
358
|
/**
|
|
344
|
-
*
|
|
359
|
+
* An object with custom data. You can store up to 32kB as custom data.
|
|
345
360
|
*/
|
|
346
|
-
|
|
361
|
+
userData?: Record<string, unknown>;
|
|
347
362
|
/**
|
|
348
|
-
*
|
|
363
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
|
|
349
364
|
*/
|
|
350
|
-
|
|
365
|
+
queryID?: string;
|
|
351
366
|
/**
|
|
352
|
-
* Whether
|
|
367
|
+
* Whether automatic events collection is enabled for the application.
|
|
353
368
|
*/
|
|
354
|
-
|
|
369
|
+
_automaticInsights?: boolean;
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
type BrowsePagination = {
|
|
355
373
|
/**
|
|
356
|
-
*
|
|
374
|
+
* Page of search results to retrieve.
|
|
357
375
|
*/
|
|
358
|
-
|
|
376
|
+
page?: number;
|
|
359
377
|
/**
|
|
360
|
-
*
|
|
378
|
+
* Number of results (hits).
|
|
361
379
|
*/
|
|
362
|
-
|
|
380
|
+
nbHits?: number;
|
|
363
381
|
/**
|
|
364
|
-
*
|
|
382
|
+
* Number of pages of results.
|
|
365
383
|
*/
|
|
366
|
-
|
|
384
|
+
nbPages?: number;
|
|
385
|
+
/**
|
|
386
|
+
* Number of hits per page.
|
|
387
|
+
*/
|
|
388
|
+
hitsPerPage?: number;
|
|
367
389
|
};
|
|
368
390
|
|
|
369
|
-
type
|
|
391
|
+
type Cursor = {
|
|
370
392
|
/**
|
|
371
|
-
*
|
|
393
|
+
* Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
|
|
372
394
|
*/
|
|
373
|
-
|
|
395
|
+
cursor?: string;
|
|
374
396
|
};
|
|
375
397
|
|
|
376
|
-
|
|
398
|
+
/**
|
|
399
|
+
* Whether the whole query string matches or only a part.
|
|
400
|
+
*/
|
|
401
|
+
type MatchLevel = 'none' | 'partial' | 'full';
|
|
377
402
|
|
|
378
403
|
/**
|
|
379
|
-
*
|
|
404
|
+
* Surround words that match the query with HTML tags for highlighting.
|
|
380
405
|
*/
|
|
381
|
-
type
|
|
406
|
+
type HighlightResultOption = {
|
|
382
407
|
/**
|
|
383
|
-
*
|
|
408
|
+
* Highlighted attribute value, including HTML tags.
|
|
384
409
|
*/
|
|
385
|
-
|
|
410
|
+
value: string;
|
|
411
|
+
matchLevel: MatchLevel;
|
|
386
412
|
/**
|
|
387
|
-
*
|
|
413
|
+
* List of matched words from the search query.
|
|
388
414
|
*/
|
|
389
|
-
|
|
415
|
+
matchedWords: Array<string>;
|
|
390
416
|
/**
|
|
391
|
-
* Whether the
|
|
417
|
+
* Whether the entire attribute value is highlighted.
|
|
392
418
|
*/
|
|
393
|
-
|
|
419
|
+
fullyHighlighted?: boolean;
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
type HighlightResult = HighlightResultOption | {
|
|
423
|
+
[key: string]: HighlightResult;
|
|
424
|
+
} | Array<HighlightResult>;
|
|
425
|
+
|
|
426
|
+
type MatchedGeoLocation = {
|
|
394
427
|
/**
|
|
395
|
-
*
|
|
428
|
+
* Latitude of the matched location.
|
|
396
429
|
*/
|
|
397
|
-
|
|
430
|
+
lat?: number;
|
|
398
431
|
/**
|
|
399
|
-
*
|
|
432
|
+
* Longitude of the matched location.
|
|
400
433
|
*/
|
|
401
|
-
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
type FacetStats = {
|
|
434
|
+
lng?: number;
|
|
405
435
|
/**
|
|
406
|
-
*
|
|
436
|
+
* Distance between the matched location and the search location (in meters).
|
|
407
437
|
*/
|
|
408
|
-
|
|
438
|
+
distance?: number;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
type Personalization = {
|
|
409
442
|
/**
|
|
410
|
-
*
|
|
443
|
+
* The score of the filters.
|
|
411
444
|
*/
|
|
412
|
-
|
|
445
|
+
filtersScore?: number;
|
|
413
446
|
/**
|
|
414
|
-
*
|
|
447
|
+
* The score of the ranking.
|
|
415
448
|
*/
|
|
416
|
-
|
|
449
|
+
rankingScore?: number;
|
|
417
450
|
/**
|
|
418
|
-
*
|
|
451
|
+
* The score of the event.
|
|
419
452
|
*/
|
|
420
|
-
|
|
453
|
+
score?: number;
|
|
421
454
|
};
|
|
422
455
|
|
|
423
456
|
/**
|
|
424
|
-
*
|
|
457
|
+
* Object with detailed information about the record\'s ranking.
|
|
425
458
|
*/
|
|
426
|
-
type
|
|
427
|
-
ruleObjectID: string;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
type RedirectRuleIndexMetadata = {
|
|
459
|
+
type RankingInfo = {
|
|
431
460
|
/**
|
|
432
|
-
*
|
|
461
|
+
* Whether a filter matched the query.
|
|
433
462
|
*/
|
|
434
|
-
|
|
463
|
+
filters?: number;
|
|
435
464
|
/**
|
|
436
|
-
*
|
|
465
|
+
* Position of the first matched word in the best matching attribute of the record.
|
|
437
466
|
*/
|
|
438
|
-
|
|
467
|
+
firstMatchedWord: number;
|
|
439
468
|
/**
|
|
440
|
-
*
|
|
469
|
+
* Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
|
|
441
470
|
*/
|
|
442
|
-
|
|
471
|
+
geoDistance: number;
|
|
443
472
|
/**
|
|
444
|
-
*
|
|
473
|
+
* Precision used when computing the geo distance, in meters.
|
|
445
474
|
*/
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
|
|
452
|
-
*/
|
|
453
|
-
type Redirect = {
|
|
454
|
-
index?: RedirectRuleIndexMetadata[];
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Order of facet names.
|
|
459
|
-
*/
|
|
460
|
-
type Facets = {
|
|
475
|
+
geoPrecision?: number;
|
|
476
|
+
matchedGeoLocation?: MatchedGeoLocation;
|
|
477
|
+
personalization?: Personalization;
|
|
461
478
|
/**
|
|
462
|
-
*
|
|
479
|
+
* Number of exactly matched words.
|
|
463
480
|
*/
|
|
464
|
-
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
|
|
469
|
-
*/
|
|
470
|
-
type SortRemainingBy = 'alpha' | 'count' | 'hidden';
|
|
471
|
-
|
|
472
|
-
type Value = {
|
|
481
|
+
nbExactWords: number;
|
|
473
482
|
/**
|
|
474
|
-
*
|
|
483
|
+
* Number of typos encountered when matching the record.
|
|
475
484
|
*/
|
|
476
|
-
|
|
477
|
-
sortRemainingBy?: SortRemainingBy;
|
|
485
|
+
nbTypos: number;
|
|
478
486
|
/**
|
|
479
|
-
*
|
|
487
|
+
* Whether the record was promoted by a rule.
|
|
488
|
+
*/
|
|
489
|
+
promoted?: boolean;
|
|
490
|
+
/**
|
|
491
|
+
* Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
|
|
492
|
+
*/
|
|
493
|
+
proximityDistance?: number;
|
|
494
|
+
/**
|
|
495
|
+
* Overall ranking of the record, expressed as a single integer. This attribute is internal.
|
|
496
|
+
*/
|
|
497
|
+
userScore: number;
|
|
498
|
+
/**
|
|
499
|
+
* Number of matched words.
|
|
500
|
+
*/
|
|
501
|
+
words?: number;
|
|
502
|
+
/**
|
|
503
|
+
* Whether the record is re-ranked.
|
|
480
504
|
*/
|
|
481
|
-
|
|
505
|
+
promotedByReRanking?: boolean;
|
|
482
506
|
};
|
|
483
507
|
|
|
484
508
|
/**
|
|
485
|
-
*
|
|
509
|
+
* Snippets that show the context around a matching search query.
|
|
486
510
|
*/
|
|
487
|
-
type
|
|
488
|
-
facets?: Facets;
|
|
511
|
+
type SnippetResultOption = {
|
|
489
512
|
/**
|
|
490
|
-
*
|
|
513
|
+
* Highlighted attribute value, including HTML tags.
|
|
491
514
|
*/
|
|
492
|
-
|
|
515
|
+
value: string;
|
|
516
|
+
matchLevel: MatchLevel;
|
|
493
517
|
};
|
|
494
518
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
type RedirectURL = {
|
|
499
|
-
url?: string;
|
|
500
|
-
};
|
|
519
|
+
type SnippetResult = SnippetResultOption | {
|
|
520
|
+
[key: string]: SnippetResult;
|
|
521
|
+
} | Array<SnippetResult>;
|
|
501
522
|
|
|
502
523
|
/**
|
|
503
|
-
*
|
|
524
|
+
* Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
|
|
504
525
|
*/
|
|
505
|
-
type
|
|
506
|
-
facetOrdering?: FacetOrdering;
|
|
507
|
-
redirect?: RedirectURL;
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
type BaseSearchResponse = Record<string, any> & {
|
|
526
|
+
type Hit<T = Record<string, any>> = T & {
|
|
511
527
|
/**
|
|
512
|
-
*
|
|
528
|
+
* Unique record identifier.
|
|
513
529
|
*/
|
|
514
|
-
|
|
530
|
+
objectID: string;
|
|
515
531
|
/**
|
|
516
|
-
*
|
|
532
|
+
* Surround words that match the query with HTML tags for highlighting.
|
|
517
533
|
*/
|
|
518
|
-
|
|
534
|
+
_highlightResult?: {
|
|
535
|
+
[key: string]: HighlightResult;
|
|
536
|
+
};
|
|
519
537
|
/**
|
|
520
|
-
*
|
|
538
|
+
* Snippets that show the context around a matching search query.
|
|
521
539
|
*/
|
|
522
|
-
|
|
540
|
+
_snippetResult?: {
|
|
541
|
+
[key: string]: SnippetResult;
|
|
542
|
+
};
|
|
543
|
+
_rankingInfo?: RankingInfo;
|
|
544
|
+
_distinctSeqID?: number;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
type SearchHits<T = Record<string, any>> = Record<string, any> & {
|
|
523
548
|
/**
|
|
524
|
-
*
|
|
549
|
+
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
|
|
525
550
|
*/
|
|
526
|
-
|
|
527
|
-
exhaustive?: Exhaustive;
|
|
551
|
+
hits: Hit<T>[];
|
|
528
552
|
/**
|
|
529
|
-
*
|
|
553
|
+
* Search query.
|
|
530
554
|
*/
|
|
531
|
-
|
|
555
|
+
query: string;
|
|
532
556
|
/**
|
|
533
|
-
*
|
|
557
|
+
* URL-encoded string of all search parameters.
|
|
534
558
|
*/
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
559
|
+
params: string;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Response and creation timestamp.
|
|
566
|
+
*/
|
|
567
|
+
type CreatedAtResponse = {
|
|
568
|
+
/**
|
|
569
|
+
* Date and time when the object was created, in RFC 3339 format.
|
|
538
570
|
*/
|
|
539
|
-
|
|
571
|
+
createdAt: string;
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
type DeleteApiKeyResponse = {
|
|
540
575
|
/**
|
|
541
|
-
*
|
|
576
|
+
* Date and time when the object was deleted, in RFC 3339 format.
|
|
542
577
|
*/
|
|
543
|
-
|
|
578
|
+
deletedAt: string;
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
type DeleteSourceResponse = {
|
|
544
582
|
/**
|
|
545
|
-
*
|
|
583
|
+
* Date and time when the object was deleted, in RFC 3339 format.
|
|
546
584
|
*/
|
|
547
|
-
|
|
585
|
+
deletedAt: string;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Response, taskID, and deletion timestamp.
|
|
590
|
+
*/
|
|
591
|
+
type DeletedAtResponse = {
|
|
548
592
|
/**
|
|
549
|
-
*
|
|
593
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
|
|
594
|
+
*/
|
|
595
|
+
taskID: number;
|
|
596
|
+
/**
|
|
597
|
+
* Date and time when the object was deleted, in RFC 3339 format.
|
|
598
|
+
*/
|
|
599
|
+
deletedAt: string;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and boolean values.
|
|
604
|
+
*/
|
|
605
|
+
type StandardEntries = {
|
|
606
|
+
/**
|
|
607
|
+
* Key-value pair of a language ISO code and a boolean value.
|
|
608
|
+
*/
|
|
609
|
+
plurals?: {
|
|
610
|
+
[key: string]: boolean;
|
|
611
|
+
} | null;
|
|
612
|
+
/**
|
|
613
|
+
* Key-value pair of a language ISO code and a boolean value.
|
|
614
|
+
*/
|
|
615
|
+
stopwords?: {
|
|
616
|
+
[key: string]: boolean;
|
|
617
|
+
} | null;
|
|
618
|
+
/**
|
|
619
|
+
* Key-value pair of a language ISO code and a boolean value.
|
|
620
|
+
*/
|
|
621
|
+
compounds?: {
|
|
622
|
+
[key: string]: boolean;
|
|
623
|
+
} | null;
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Turn on or off the built-in Algolia stop words for a specific language.
|
|
628
|
+
*/
|
|
629
|
+
type DictionarySettingsParams = {
|
|
630
|
+
disableStandardEntries: StandardEntries;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
type BaseGetApiKeyResponse = {
|
|
634
|
+
/**
|
|
635
|
+
* API key.
|
|
636
|
+
*/
|
|
637
|
+
value?: string;
|
|
638
|
+
/**
|
|
639
|
+
* Timestamp when the object was created, in milliseconds since the Unix epoch.
|
|
640
|
+
*/
|
|
641
|
+
createdAt: number;
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
type GetApiKeyResponse = BaseGetApiKeyResponse & ApiKey;
|
|
645
|
+
|
|
646
|
+
type GetDictionarySettingsResponse = {
|
|
647
|
+
disableStandardEntries: StandardEntries;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
type LogQuery = {
|
|
651
|
+
/**
|
|
652
|
+
* Index targeted by the query.
|
|
653
|
+
*/
|
|
654
|
+
index_name?: string;
|
|
655
|
+
/**
|
|
656
|
+
* A user identifier.
|
|
657
|
+
*/
|
|
658
|
+
user_token?: string;
|
|
659
|
+
/**
|
|
660
|
+
* Unique query identifier.
|
|
661
|
+
*/
|
|
662
|
+
query_id?: string;
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
type Log = {
|
|
666
|
+
/**
|
|
667
|
+
* Date and time of the API request, in RFC 3339 format.
|
|
668
|
+
*/
|
|
669
|
+
timestamp: string;
|
|
670
|
+
/**
|
|
671
|
+
* HTTP method of the request.
|
|
672
|
+
*/
|
|
673
|
+
method: string;
|
|
674
|
+
/**
|
|
675
|
+
* HTTP status code of the response.
|
|
676
|
+
*/
|
|
677
|
+
answer_code: string;
|
|
678
|
+
/**
|
|
679
|
+
* Request body.
|
|
680
|
+
*/
|
|
681
|
+
query_body: string;
|
|
682
|
+
/**
|
|
683
|
+
* Response body.
|
|
684
|
+
*/
|
|
685
|
+
answer: string;
|
|
686
|
+
/**
|
|
687
|
+
* URL of the API endpoint.
|
|
688
|
+
*/
|
|
689
|
+
url: string;
|
|
690
|
+
/**
|
|
691
|
+
* IP address of the client that performed the request.
|
|
692
|
+
*/
|
|
693
|
+
ip: string;
|
|
694
|
+
/**
|
|
695
|
+
* Request headers (API keys are obfuscated).
|
|
696
|
+
*/
|
|
697
|
+
query_headers: string;
|
|
698
|
+
/**
|
|
699
|
+
* SHA1 signature of the log entry.
|
|
700
|
+
*/
|
|
701
|
+
sha1: string;
|
|
702
|
+
/**
|
|
703
|
+
* Number of API requests.
|
|
704
|
+
*/
|
|
705
|
+
nb_api_calls: string;
|
|
706
|
+
/**
|
|
707
|
+
* Processing time for the query in milliseconds. This doesn\'t include latency due to the network.
|
|
708
|
+
*/
|
|
709
|
+
processing_time_ms: string;
|
|
710
|
+
/**
|
|
711
|
+
* Index targeted by the query.
|
|
550
712
|
*/
|
|
551
713
|
index?: string;
|
|
552
714
|
/**
|
|
553
|
-
*
|
|
715
|
+
* Query parameters sent with the request.
|
|
554
716
|
*/
|
|
555
|
-
|
|
717
|
+
query_params?: string;
|
|
556
718
|
/**
|
|
557
|
-
*
|
|
719
|
+
* Number of search results (hits) returned for the query.
|
|
558
720
|
*/
|
|
559
|
-
|
|
721
|
+
query_nb_hits?: string;
|
|
560
722
|
/**
|
|
561
|
-
*
|
|
723
|
+
* Queries performed for the given request.
|
|
562
724
|
*/
|
|
563
|
-
|
|
725
|
+
inner_queries?: Array<LogQuery>;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
type GetLogsResponse = {
|
|
729
|
+
logs: Array<Log>;
|
|
730
|
+
};
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Request body for retrieving records.
|
|
734
|
+
*/
|
|
735
|
+
type GetObjectsRequest = {
|
|
564
736
|
/**
|
|
565
|
-
*
|
|
737
|
+
* Attributes to retrieve. If not specified, all retrievable attributes are returned.
|
|
566
738
|
*/
|
|
567
|
-
|
|
739
|
+
attributesToRetrieve?: Array<string>;
|
|
568
740
|
/**
|
|
569
|
-
*
|
|
741
|
+
* Object ID for the record to retrieve.
|
|
570
742
|
*/
|
|
571
|
-
|
|
743
|
+
objectID: string;
|
|
572
744
|
/**
|
|
573
|
-
*
|
|
745
|
+
* Index from which to retrieve the records.
|
|
574
746
|
*/
|
|
575
|
-
|
|
747
|
+
indexName: string;
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Request parameters.
|
|
752
|
+
*/
|
|
753
|
+
type GetObjectsParams = {
|
|
754
|
+
requests: Array<GetObjectsRequest>;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
type GetObjectsResponse<T = Record<string, any>> = {
|
|
576
758
|
/**
|
|
577
|
-
*
|
|
759
|
+
* Retrieved records.
|
|
578
760
|
*/
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
761
|
+
results: T[];
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Task status, `published` if the task is completed, `notPublished` otherwise.
|
|
766
|
+
*/
|
|
767
|
+
type TaskStatus = 'published' | 'notPublished';
|
|
768
|
+
|
|
769
|
+
type GetTaskResponse = {
|
|
770
|
+
status: TaskStatus;
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Unique user ID.
|
|
775
|
+
*/
|
|
776
|
+
type UserId = {
|
|
582
777
|
/**
|
|
583
|
-
*
|
|
778
|
+
* Unique identifier of the user who makes the search request.
|
|
584
779
|
*/
|
|
585
|
-
|
|
780
|
+
userID: string;
|
|
586
781
|
/**
|
|
587
|
-
*
|
|
782
|
+
* Cluster to which the user is assigned.
|
|
588
783
|
*/
|
|
589
|
-
|
|
784
|
+
clusterName: string;
|
|
590
785
|
/**
|
|
591
|
-
*
|
|
786
|
+
* Number of records belonging to the user.
|
|
592
787
|
*/
|
|
593
|
-
|
|
788
|
+
nbRecords: number;
|
|
594
789
|
/**
|
|
595
|
-
*
|
|
790
|
+
* Data size used by the user.
|
|
596
791
|
*/
|
|
597
|
-
|
|
792
|
+
dataSize: number;
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* User IDs and clusters.
|
|
797
|
+
*/
|
|
798
|
+
type GetTopUserIdsResponse = {
|
|
598
799
|
/**
|
|
599
|
-
*
|
|
800
|
+
* Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
|
|
600
801
|
*/
|
|
601
|
-
|
|
802
|
+
topUsers: Array<{
|
|
803
|
+
[key: string]: Array<UserId>;
|
|
804
|
+
}>;
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
type HasPendingMappingsResponse = {
|
|
808
|
+
/**
|
|
809
|
+
* Whether there are clusters undergoing migration, creation, or deletion.
|
|
810
|
+
*/
|
|
811
|
+
pending: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Cluster pending mapping state: migrating, creating, deleting.
|
|
814
|
+
*/
|
|
815
|
+
clusters?: {
|
|
816
|
+
[key: string]: Array<string>;
|
|
817
|
+
};
|
|
602
818
|
};
|
|
603
819
|
|
|
604
820
|
/**
|
|
605
|
-
*
|
|
821
|
+
* Dictionary type. If `null`, this dictionary type isn\'t supported for the language.
|
|
606
822
|
*/
|
|
607
|
-
type
|
|
823
|
+
type DictionaryLanguage = {
|
|
608
824
|
/**
|
|
609
|
-
*
|
|
825
|
+
* Number of custom dictionary entries.
|
|
610
826
|
*/
|
|
611
|
-
|
|
827
|
+
nbCustomEntries?: number;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Dictionary language.
|
|
832
|
+
*/
|
|
833
|
+
type Languages = {
|
|
834
|
+
plurals: DictionaryLanguage | null;
|
|
835
|
+
stopwords: DictionaryLanguage | null;
|
|
836
|
+
compounds: DictionaryLanguage | null;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
type ListApiKeysResponse = {
|
|
612
840
|
/**
|
|
613
|
-
*
|
|
841
|
+
* API keys.
|
|
614
842
|
*/
|
|
615
|
-
|
|
843
|
+
keys: Array<GetApiKeyResponse>;
|
|
616
844
|
};
|
|
617
845
|
|
|
618
846
|
/**
|
|
619
|
-
*
|
|
847
|
+
* Clusters.
|
|
620
848
|
*/
|
|
621
|
-
type
|
|
849
|
+
type ListClustersResponse = {
|
|
850
|
+
/**
|
|
851
|
+
* Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
|
|
852
|
+
*/
|
|
853
|
+
topUsers: Array<string>;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
type FetchedIndex = {
|
|
857
|
+
/**
|
|
858
|
+
* Index name.
|
|
859
|
+
*/
|
|
860
|
+
name: string;
|
|
861
|
+
/**
|
|
862
|
+
* Index creation date. An empty string means that the index has no records.
|
|
863
|
+
*/
|
|
864
|
+
createdAt: string;
|
|
865
|
+
/**
|
|
866
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
867
|
+
*/
|
|
868
|
+
updatedAt: string;
|
|
869
|
+
/**
|
|
870
|
+
* Number of records contained in the index.
|
|
871
|
+
*/
|
|
872
|
+
entries: number;
|
|
873
|
+
/**
|
|
874
|
+
* Number of bytes of the index in minified format.
|
|
875
|
+
*/
|
|
876
|
+
dataSize: number;
|
|
877
|
+
/**
|
|
878
|
+
* Number of bytes of the index binary file.
|
|
879
|
+
*/
|
|
880
|
+
fileSize: number;
|
|
881
|
+
/**
|
|
882
|
+
* Last build time.
|
|
883
|
+
*/
|
|
884
|
+
lastBuildTimeS: number;
|
|
885
|
+
/**
|
|
886
|
+
* Number of pending indexing operations. This value is deprecated and should not be used.
|
|
887
|
+
*/
|
|
888
|
+
numberOfPendingTasks: number;
|
|
889
|
+
/**
|
|
890
|
+
* A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
|
|
891
|
+
*/
|
|
892
|
+
pendingTask: boolean;
|
|
893
|
+
/**
|
|
894
|
+
* Only present if the index is a replica. Contains the name of the related primary index.
|
|
895
|
+
*/
|
|
896
|
+
primary?: string;
|
|
897
|
+
/**
|
|
898
|
+
* Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
|
|
899
|
+
*/
|
|
900
|
+
replicas?: Array<string>;
|
|
901
|
+
/**
|
|
902
|
+
* Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
|
|
903
|
+
*/
|
|
904
|
+
virtual?: boolean;
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
type ListIndicesResponse = {
|
|
908
|
+
/**
|
|
909
|
+
* All indices in your Algolia application.
|
|
910
|
+
*/
|
|
911
|
+
items: Array<FetchedIndex>;
|
|
912
|
+
/**
|
|
913
|
+
* Number of pages.
|
|
914
|
+
*/
|
|
915
|
+
nbPages?: number;
|
|
916
|
+
};
|
|
622
917
|
|
|
623
918
|
/**
|
|
624
|
-
*
|
|
919
|
+
* User ID data.
|
|
625
920
|
*/
|
|
626
|
-
type
|
|
921
|
+
type ListUserIdsResponse = {
|
|
922
|
+
/**
|
|
923
|
+
* User IDs.
|
|
924
|
+
*/
|
|
925
|
+
userIDs: Array<UserId>;
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
type MultipleBatchResponse = {
|
|
929
|
+
/**
|
|
930
|
+
* Task IDs. One for each index.
|
|
931
|
+
*/
|
|
932
|
+
taskID: {
|
|
933
|
+
[key: string]: number;
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
936
|
+
* Unique record identifiers.
|
|
937
|
+
*/
|
|
938
|
+
objectIDs: Array<string>;
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
type RemoveUserIdResponse = {
|
|
942
|
+
/**
|
|
943
|
+
* Date and time when the object was deleted, in RFC 3339 format.
|
|
944
|
+
*/
|
|
945
|
+
deletedAt: string;
|
|
946
|
+
};
|
|
627
947
|
|
|
628
948
|
/**
|
|
629
|
-
*
|
|
949
|
+
* Response, taskID, and update timestamp.
|
|
630
950
|
*/
|
|
631
|
-
type
|
|
951
|
+
type UpdatedAtResponse = {
|
|
952
|
+
/**
|
|
953
|
+
* 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`.
|
|
954
|
+
*/
|
|
955
|
+
taskID: number;
|
|
956
|
+
/**
|
|
957
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
958
|
+
*/
|
|
959
|
+
updatedAt: string;
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
type ReplaceAllObjectsResponse = {
|
|
963
|
+
copyOperationResponse: UpdatedAtResponse;
|
|
964
|
+
/**
|
|
965
|
+
* The response of the `batch` request(s).
|
|
966
|
+
*/
|
|
967
|
+
batchResponses: Array<BatchResponse>;
|
|
968
|
+
moveOperationResponse: UpdatedAtResponse;
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
type ReplaceSourceResponse = {
|
|
972
|
+
/**
|
|
973
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
974
|
+
*/
|
|
975
|
+
updatedAt: string;
|
|
976
|
+
};
|
|
632
977
|
|
|
633
978
|
/**
|
|
634
|
-
*
|
|
979
|
+
* Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`.
|
|
635
980
|
*/
|
|
636
|
-
type
|
|
981
|
+
type Anchoring = 'is' | 'startsWith' | 'endsWith' | 'contains';
|
|
982
|
+
|
|
983
|
+
type Condition = {
|
|
637
984
|
/**
|
|
638
|
-
*
|
|
985
|
+
* 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\".
|
|
639
986
|
*/
|
|
640
|
-
|
|
641
|
-
|
|
987
|
+
pattern?: string;
|
|
988
|
+
anchoring?: Anchoring;
|
|
642
989
|
/**
|
|
643
|
-
*
|
|
990
|
+
* Whether the pattern should match plurals, synonyms, and typos.
|
|
644
991
|
*/
|
|
645
|
-
|
|
992
|
+
alternatives?: boolean;
|
|
646
993
|
/**
|
|
647
|
-
*
|
|
994
|
+
* 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.
|
|
648
995
|
*/
|
|
649
|
-
|
|
996
|
+
context?: string;
|
|
650
997
|
/**
|
|
651
|
-
*
|
|
998
|
+
* 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.
|
|
652
999
|
*/
|
|
653
|
-
|
|
654
|
-
state?: DictionaryEntryState;
|
|
655
|
-
type?: DictionaryEntryType;
|
|
1000
|
+
filters?: string;
|
|
656
1001
|
};
|
|
657
1002
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
1003
|
+
/**
|
|
1004
|
+
* Object ID of the record to hide.
|
|
1005
|
+
*/
|
|
1006
|
+
type ConsequenceHide = {
|
|
1007
|
+
/**
|
|
1008
|
+
* Unique record identifier.
|
|
1009
|
+
*/
|
|
1010
|
+
objectID: string;
|
|
661
1011
|
};
|
|
662
1012
|
|
|
663
1013
|
/**
|
|
664
|
-
*
|
|
1014
|
+
* Range object with lower and upper values in meters to define custom ranges.
|
|
665
1015
|
*/
|
|
666
|
-
type
|
|
1016
|
+
type Range = {
|
|
1017
|
+
/**
|
|
1018
|
+
* Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
1019
|
+
*/
|
|
1020
|
+
from?: number;
|
|
1021
|
+
/**
|
|
1022
|
+
* Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
1023
|
+
*/
|
|
1024
|
+
value?: number;
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
|
|
1029
|
+
*/
|
|
1030
|
+
type AroundPrecision = number | Array<Range>;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
|
|
1034
|
+
*/
|
|
1035
|
+
type AroundRadiusAll = 'all';
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
|
|
1039
|
+
*/
|
|
1040
|
+
type AroundRadius = number | AroundRadiusAll;
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* 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`.
|
|
1044
|
+
*/
|
|
1045
|
+
type FacetFilters = Array<FacetFilters> | string;
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* 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`.
|
|
1049
|
+
*/
|
|
1050
|
+
type NumericFilters = Array<NumericFilters> | string;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* 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.
|
|
1054
|
+
*/
|
|
1055
|
+
type OptionalFilters = Array<OptionalFilters> | string;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* ISO code for a supported language.
|
|
1059
|
+
*/
|
|
1060
|
+
type SupportedLanguage = 'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt' | 'pt-br' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh';
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
|
|
1064
|
+
*/
|
|
1065
|
+
type TagFilters = Array<TagFilters> | string;
|
|
1066
|
+
|
|
1067
|
+
type BaseSearchParamsWithoutQuery = {
|
|
1068
|
+
/**
|
|
1069
|
+
* Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
|
|
1070
|
+
*/
|
|
1071
|
+
similarQuery?: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* 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/).
|
|
1074
|
+
*/
|
|
1075
|
+
filters?: string;
|
|
1076
|
+
facetFilters?: FacetFilters;
|
|
1077
|
+
optionalFilters?: OptionalFilters;
|
|
1078
|
+
numericFilters?: NumericFilters;
|
|
1079
|
+
tagFilters?: TagFilters;
|
|
1080
|
+
/**
|
|
1081
|
+
* Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
|
|
1082
|
+
*/
|
|
1083
|
+
sumOrFiltersScores?: boolean;
|
|
1084
|
+
/**
|
|
1085
|
+
* Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
|
|
1086
|
+
*/
|
|
1087
|
+
restrictSearchableAttributes?: Array<string>;
|
|
1088
|
+
/**
|
|
1089
|
+
* 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).
|
|
1090
|
+
*/
|
|
1091
|
+
facets?: Array<string>;
|
|
1092
|
+
/**
|
|
1093
|
+
* 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`.
|
|
1094
|
+
*/
|
|
1095
|
+
facetingAfterDistinct?: boolean;
|
|
1096
|
+
/**
|
|
1097
|
+
* Page of search results to retrieve.
|
|
1098
|
+
*/
|
|
1099
|
+
page?: number;
|
|
1100
|
+
/**
|
|
1101
|
+
* Position of the first hit to retrieve.
|
|
1102
|
+
*/
|
|
1103
|
+
offset?: number;
|
|
1104
|
+
/**
|
|
1105
|
+
* Number of hits to retrieve (used in combination with `offset`).
|
|
1106
|
+
*/
|
|
1107
|
+
length?: number;
|
|
1108
|
+
/**
|
|
1109
|
+
* 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`.
|
|
1110
|
+
*/
|
|
1111
|
+
aroundLatLng?: string;
|
|
1112
|
+
/**
|
|
1113
|
+
* Whether to obtain the coordinates from the request\'s IP address.
|
|
1114
|
+
*/
|
|
1115
|
+
aroundLatLngViaIP?: boolean;
|
|
1116
|
+
aroundRadius?: AroundRadius;
|
|
1117
|
+
aroundPrecision?: AroundPrecision;
|
|
1118
|
+
/**
|
|
1119
|
+
* Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
|
|
1120
|
+
*/
|
|
1121
|
+
minimumAroundRadius?: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* 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).
|
|
1124
|
+
*/
|
|
1125
|
+
insideBoundingBox?: Array<Array<number>>;
|
|
667
1126
|
/**
|
|
668
|
-
*
|
|
1127
|
+
* 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`.
|
|
669
1128
|
*/
|
|
670
|
-
|
|
1129
|
+
insidePolygon?: Array<Array<number>>;
|
|
671
1130
|
/**
|
|
672
|
-
*
|
|
1131
|
+
* 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`.
|
|
673
1132
|
*/
|
|
674
|
-
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
type MultipleBatchRequest = {
|
|
678
|
-
action: Action;
|
|
1133
|
+
naturalLanguages?: Array<SupportedLanguage>;
|
|
679
1134
|
/**
|
|
680
|
-
*
|
|
1135
|
+
* 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.
|
|
681
1136
|
*/
|
|
682
|
-
|
|
1137
|
+
ruleContexts?: Array<string>;
|
|
683
1138
|
/**
|
|
684
|
-
*
|
|
1139
|
+
* 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).
|
|
685
1140
|
*/
|
|
686
|
-
|
|
687
|
-
};
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Batch parameters.
|
|
691
|
-
*/
|
|
692
|
-
type BatchParams = {
|
|
693
|
-
requests: MultipleBatchRequest[];
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
type BatchRequest = {
|
|
697
|
-
action: Action;
|
|
1141
|
+
personalizationImpact?: number;
|
|
698
1142
|
/**
|
|
699
|
-
*
|
|
1143
|
+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
|
|
700
1144
|
*/
|
|
701
|
-
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
type BatchResponse = {
|
|
1145
|
+
userToken?: string;
|
|
705
1146
|
/**
|
|
706
|
-
*
|
|
1147
|
+
* Whether the search response should include detailed ranking information.
|
|
707
1148
|
*/
|
|
708
|
-
|
|
1149
|
+
getRankingInfo?: boolean;
|
|
709
1150
|
/**
|
|
710
|
-
*
|
|
1151
|
+
* Whether to take into account an index\'s synonyms for this search.
|
|
711
1152
|
*/
|
|
712
|
-
|
|
713
|
-
};
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Batch parameters.
|
|
717
|
-
*/
|
|
718
|
-
type BatchWriteParams = {
|
|
719
|
-
requests: BatchRequest[];
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
type BooleanString = 'false' | 'true';
|
|
723
|
-
|
|
724
|
-
type BrowsePagination = {
|
|
1153
|
+
synonyms?: boolean;
|
|
725
1154
|
/**
|
|
726
|
-
*
|
|
1155
|
+
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
|
|
727
1156
|
*/
|
|
728
|
-
|
|
1157
|
+
clickAnalytics?: boolean;
|
|
729
1158
|
/**
|
|
730
|
-
*
|
|
1159
|
+
* Whether this search will be included in Analytics.
|
|
731
1160
|
*/
|
|
732
|
-
|
|
1161
|
+
analytics?: boolean;
|
|
733
1162
|
/**
|
|
734
|
-
*
|
|
1163
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
735
1164
|
*/
|
|
736
|
-
|
|
1165
|
+
analyticsTags?: Array<string>;
|
|
737
1166
|
/**
|
|
738
|
-
*
|
|
1167
|
+
* Whether to include this search when calculating processing-time percentiles.
|
|
739
1168
|
*/
|
|
740
|
-
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
type Cursor = {
|
|
1169
|
+
percentileComputation?: boolean;
|
|
744
1170
|
/**
|
|
745
|
-
*
|
|
1171
|
+
* Whether to enable A/B testing for this search.
|
|
746
1172
|
*/
|
|
747
|
-
|
|
1173
|
+
enableABTest?: boolean;
|
|
748
1174
|
};
|
|
749
1175
|
|
|
1176
|
+
type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
|
|
1177
|
+
|
|
1178
|
+
type AlternativesAsExact = 'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym';
|
|
1179
|
+
|
|
750
1180
|
/**
|
|
751
1181
|
* 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.
|
|
752
1182
|
*/
|
|
@@ -757,35 +1187,37 @@ type Distinct = boolean | number;
|
|
|
757
1187
|
*/
|
|
758
1188
|
type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
|
|
759
1189
|
|
|
1190
|
+
type BooleanString = 'true' | 'false';
|
|
1191
|
+
|
|
760
1192
|
/**
|
|
761
1193
|
* Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index.
|
|
762
1194
|
*/
|
|
763
|
-
type IgnorePlurals =
|
|
1195
|
+
type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
|
|
764
1196
|
|
|
765
1197
|
/**
|
|
766
1198
|
* Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
|
|
767
1199
|
*/
|
|
768
|
-
type Mode = '
|
|
1200
|
+
type Mode = 'neuralSearch' | 'keywordSearch';
|
|
769
1201
|
|
|
770
1202
|
/**
|
|
771
|
-
* 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/).
|
|
1203
|
+
* 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/).
|
|
772
1204
|
*/
|
|
773
|
-
type QueryType = '
|
|
1205
|
+
type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
774
1206
|
|
|
775
1207
|
/**
|
|
776
1208
|
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
|
|
777
1209
|
*/
|
|
778
|
-
type ReRankingApplyFilter = ReRankingApplyFilter
|
|
1210
|
+
type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
779
1211
|
|
|
780
1212
|
/**
|
|
781
1213
|
* Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index.
|
|
782
1214
|
*/
|
|
783
|
-
type RemoveStopWords = SupportedLanguage
|
|
1215
|
+
type RemoveStopWords = Array<SupportedLanguage> | boolean;
|
|
784
1216
|
|
|
785
1217
|
/**
|
|
786
1218
|
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
|
|
787
1219
|
*/
|
|
788
|
-
type RemoveWordsIfNoResults = '
|
|
1220
|
+
type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
|
|
789
1221
|
|
|
790
1222
|
/**
|
|
791
1223
|
* Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`.
|
|
@@ -794,7 +1226,7 @@ type SemanticSearch = {
|
|
|
794
1226
|
/**
|
|
795
1227
|
* Indices from which to collect click and conversion events. If null, the current index and all its replicas are used.
|
|
796
1228
|
*/
|
|
797
|
-
eventSources?: string
|
|
1229
|
+
eventSources?: Array<string> | null;
|
|
798
1230
|
};
|
|
799
1231
|
|
|
800
1232
|
/**
|
|
@@ -803,23 +1235,23 @@ type SemanticSearch = {
|
|
|
803
1235
|
type TypoToleranceEnum = 'min' | 'strict';
|
|
804
1236
|
|
|
805
1237
|
/**
|
|
806
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and
|
|
1238
|
+
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.
|
|
807
1239
|
*/
|
|
808
|
-
type TypoTolerance =
|
|
1240
|
+
type TypoTolerance = boolean | TypoToleranceEnum;
|
|
809
1241
|
|
|
810
1242
|
type IndexSettingsAsSearchParams = {
|
|
811
1243
|
/**
|
|
812
1244
|
* 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.
|
|
813
1245
|
*/
|
|
814
|
-
attributesToRetrieve?: string
|
|
1246
|
+
attributesToRetrieve?: Array<string>;
|
|
815
1247
|
/**
|
|
816
1248
|
* 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/).
|
|
817
1249
|
*/
|
|
818
|
-
ranking?: string
|
|
1250
|
+
ranking?: Array<string>;
|
|
819
1251
|
/**
|
|
820
1252
|
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
|
|
821
1253
|
*/
|
|
822
|
-
customRanking?: string
|
|
1254
|
+
customRanking?: Array<string>;
|
|
823
1255
|
/**
|
|
824
1256
|
* 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.
|
|
825
1257
|
*/
|
|
@@ -827,11 +1259,11 @@ type IndexSettingsAsSearchParams = {
|
|
|
827
1259
|
/**
|
|
828
1260
|
* 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/).
|
|
829
1261
|
*/
|
|
830
|
-
attributesToHighlight?: string
|
|
1262
|
+
attributesToHighlight?: Array<string>;
|
|
831
1263
|
/**
|
|
832
1264
|
* 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.
|
|
833
1265
|
*/
|
|
834
|
-
attributesToSnippet?: string
|
|
1266
|
+
attributesToSnippet?: Array<string>;
|
|
835
1267
|
/**
|
|
836
1268
|
* HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
|
837
1269
|
*/
|
|
@@ -868,7 +1300,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
868
1300
|
/**
|
|
869
1301
|
* 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.
|
|
870
1302
|
*/
|
|
871
|
-
disableTypoToleranceOnAttributes?: string
|
|
1303
|
+
disableTypoToleranceOnAttributes?: Array<string>;
|
|
872
1304
|
ignorePlurals?: IgnorePlurals;
|
|
873
1305
|
removeStopWords?: RemoveStopWords;
|
|
874
1306
|
/**
|
|
@@ -878,7 +1310,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
878
1310
|
/**
|
|
879
1311
|
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
|
|
880
1312
|
*/
|
|
881
|
-
queryLanguages?: SupportedLanguage
|
|
1313
|
+
queryLanguages?: Array<SupportedLanguage>;
|
|
882
1314
|
/**
|
|
883
1315
|
* 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).
|
|
884
1316
|
*/
|
|
@@ -900,25 +1332,25 @@ type IndexSettingsAsSearchParams = {
|
|
|
900
1332
|
*/
|
|
901
1333
|
advancedSyntax?: boolean;
|
|
902
1334
|
/**
|
|
903
|
-
* 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
|
|
1335
|
+
* 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).
|
|
904
1336
|
*/
|
|
905
|
-
optionalWords?: string
|
|
1337
|
+
optionalWords?: Array<string>;
|
|
906
1338
|
/**
|
|
907
|
-
* 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
|
|
1339
|
+
* 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.
|
|
908
1340
|
*/
|
|
909
|
-
disableExactOnAttributes?: string
|
|
1341
|
+
disableExactOnAttributes?: Array<string>;
|
|
910
1342
|
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
|
|
911
1343
|
/**
|
|
912
1344
|
* 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.
|
|
913
1345
|
*/
|
|
914
|
-
alternativesAsExact?: AlternativesAsExact
|
|
1346
|
+
alternativesAsExact?: Array<AlternativesAsExact>;
|
|
915
1347
|
/**
|
|
916
1348
|
* 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.
|
|
917
1349
|
*/
|
|
918
|
-
advancedSyntaxFeatures?: AdvancedSyntaxFeatures
|
|
1350
|
+
advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures>;
|
|
919
1351
|
distinct?: Distinct;
|
|
920
1352
|
/**
|
|
921
|
-
* 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
|
|
1353
|
+
* 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.
|
|
922
1354
|
*/
|
|
923
1355
|
replaceSynonymsInHighlight?: boolean;
|
|
924
1356
|
/**
|
|
@@ -928,7 +1360,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
928
1360
|
/**
|
|
929
1361
|
* 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.
|
|
930
1362
|
*/
|
|
931
|
-
responseFields?: string
|
|
1363
|
+
responseFields?: Array<string>;
|
|
932
1364
|
/**
|
|
933
1365
|
* 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).
|
|
934
1366
|
*/
|
|
@@ -954,215 +1386,27 @@ type IndexSettingsAsSearchParams = {
|
|
|
954
1386
|
};
|
|
955
1387
|
|
|
956
1388
|
/**
|
|
957
|
-
*
|
|
958
|
-
*/
|
|
959
|
-
type SearchParamsObject = BaseSearchParams & IndexSettingsAsSearchParams;
|
|
960
|
-
|
|
961
|
-
type BrowseParamsObject = Cursor & SearchParamsObject;
|
|
962
|
-
|
|
963
|
-
/**
|
|
964
|
-
* Search parameters as query string.
|
|
965
|
-
*/
|
|
966
|
-
type SearchParamsString = {
|
|
967
|
-
/**
|
|
968
|
-
* Search parameters as a URL-encoded query string.
|
|
969
|
-
*/
|
|
970
|
-
params?: string;
|
|
971
|
-
};
|
|
972
|
-
|
|
973
|
-
type BrowseParams = BrowseParamsObject | SearchParamsString;
|
|
974
|
-
|
|
975
|
-
/**
|
|
976
|
-
* Whether the whole query string matches or only a part.
|
|
977
|
-
*/
|
|
978
|
-
type MatchLevel = 'full' | 'none' | 'partial';
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* Surround words that match the query with HTML tags for highlighting.
|
|
982
|
-
*/
|
|
983
|
-
type HighlightResultOption = {
|
|
984
|
-
/**
|
|
985
|
-
* Highlighted attribute value, including HTML tags.
|
|
986
|
-
*/
|
|
987
|
-
value: string;
|
|
988
|
-
matchLevel: MatchLevel;
|
|
989
|
-
/**
|
|
990
|
-
* List of matched words from the search query.
|
|
991
|
-
*/
|
|
992
|
-
matchedWords: string[];
|
|
993
|
-
/**
|
|
994
|
-
* Whether the entire attribute value is highlighted.
|
|
995
|
-
*/
|
|
996
|
-
fullyHighlighted?: boolean;
|
|
997
|
-
};
|
|
998
|
-
|
|
999
|
-
type HighlightResult = HighlightResult[] | HighlightResultOption | {
|
|
1000
|
-
[key: string]: HighlightResult;
|
|
1001
|
-
};
|
|
1002
|
-
|
|
1003
|
-
type MatchedGeoLocation = {
|
|
1004
|
-
/**
|
|
1005
|
-
* Latitude of the matched location.
|
|
1006
|
-
*/
|
|
1007
|
-
lat?: number;
|
|
1008
|
-
/**
|
|
1009
|
-
* Longitude of the matched location.
|
|
1010
|
-
*/
|
|
1011
|
-
lng?: number;
|
|
1012
|
-
/**
|
|
1013
|
-
* Distance between the matched location and the search location (in meters).
|
|
1014
|
-
*/
|
|
1015
|
-
distance?: number;
|
|
1016
|
-
};
|
|
1017
|
-
|
|
1018
|
-
type Personalization = {
|
|
1019
|
-
/**
|
|
1020
|
-
* The score of the filters.
|
|
1021
|
-
*/
|
|
1022
|
-
filtersScore?: number;
|
|
1023
|
-
/**
|
|
1024
|
-
* The score of the ranking.
|
|
1025
|
-
*/
|
|
1026
|
-
rankingScore?: number;
|
|
1027
|
-
/**
|
|
1028
|
-
* The score of the event.
|
|
1029
|
-
*/
|
|
1030
|
-
score?: number;
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* Object with detailed information about the record\'s ranking.
|
|
1035
|
-
*/
|
|
1036
|
-
type RankingInfo = {
|
|
1037
|
-
/**
|
|
1038
|
-
* Whether a filter matched the query.
|
|
1039
|
-
*/
|
|
1040
|
-
filters?: number;
|
|
1041
|
-
/**
|
|
1042
|
-
* Position of the first matched word in the best matching attribute of the record.
|
|
1043
|
-
*/
|
|
1044
|
-
firstMatchedWord: number;
|
|
1045
|
-
/**
|
|
1046
|
-
* Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
|
|
1047
|
-
*/
|
|
1048
|
-
geoDistance: number;
|
|
1049
|
-
/**
|
|
1050
|
-
* Precision used when computing the geo distance, in meters.
|
|
1051
|
-
*/
|
|
1052
|
-
geoPrecision?: number;
|
|
1053
|
-
matchedGeoLocation?: MatchedGeoLocation;
|
|
1054
|
-
personalization?: Personalization;
|
|
1055
|
-
/**
|
|
1056
|
-
* Number of exactly matched words.
|
|
1057
|
-
*/
|
|
1058
|
-
nbExactWords: number;
|
|
1059
|
-
/**
|
|
1060
|
-
* Number of typos encountered when matching the record.
|
|
1061
|
-
*/
|
|
1062
|
-
nbTypos: number;
|
|
1063
|
-
/**
|
|
1064
|
-
* Whether the record was promoted by a rule.
|
|
1065
|
-
*/
|
|
1066
|
-
promoted?: boolean;
|
|
1067
|
-
/**
|
|
1068
|
-
* Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
|
|
1069
|
-
*/
|
|
1070
|
-
proximityDistance?: number;
|
|
1071
|
-
/**
|
|
1072
|
-
* Overall ranking of the record, expressed as a single integer. This attribute is internal.
|
|
1073
|
-
*/
|
|
1074
|
-
userScore: number;
|
|
1075
|
-
/**
|
|
1076
|
-
* Number of matched words.
|
|
1077
|
-
*/
|
|
1078
|
-
words?: number;
|
|
1079
|
-
/**
|
|
1080
|
-
* Whether the record is re-ranked.
|
|
1081
|
-
*/
|
|
1082
|
-
promotedByReRanking?: boolean;
|
|
1083
|
-
};
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* Snippets that show the context around a matching search query.
|
|
1087
|
-
*/
|
|
1088
|
-
type SnippetResultOption = {
|
|
1089
|
-
/**
|
|
1090
|
-
* Highlighted attribute value, including HTML tags.
|
|
1091
|
-
*/
|
|
1092
|
-
value: string;
|
|
1093
|
-
matchLevel: MatchLevel;
|
|
1094
|
-
};
|
|
1095
|
-
|
|
1096
|
-
type SnippetResult = SnippetResult[] | SnippetResultOption | {
|
|
1097
|
-
[key: string]: SnippetResult;
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
|
|
1389
|
+
* Filter or optional filter to be applied to the search.
|
|
1102
1390
|
*/
|
|
1103
|
-
type
|
|
1104
|
-
/**
|
|
1105
|
-
* Unique record identifier.
|
|
1106
|
-
*/
|
|
1107
|
-
objectID: string;
|
|
1108
|
-
/**
|
|
1109
|
-
* Surround words that match the query with HTML tags for highlighting.
|
|
1110
|
-
*/
|
|
1111
|
-
_highlightResult?: Record<string, HighlightResult>;
|
|
1112
|
-
/**
|
|
1113
|
-
* Snippets that show the context around a matching search query.
|
|
1114
|
-
*/
|
|
1115
|
-
_snippetResult?: Record<string, SnippetResult>;
|
|
1116
|
-
_rankingInfo?: RankingInfo;
|
|
1117
|
-
_distinctSeqID?: number;
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
|
-
type SearchHits<T = Record<string, any>> = Record<string, any> & {
|
|
1121
|
-
/**
|
|
1122
|
-
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
|
|
1123
|
-
*/
|
|
1124
|
-
hits: Array<Hit<T>>;
|
|
1125
|
-
/**
|
|
1126
|
-
* Search query.
|
|
1127
|
-
*/
|
|
1128
|
-
query: string;
|
|
1129
|
-
/**
|
|
1130
|
-
* URL-encoded string of all search parameters.
|
|
1131
|
-
*/
|
|
1132
|
-
params: string;
|
|
1133
|
-
};
|
|
1134
|
-
|
|
1135
|
-
type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & Cursor & SearchHits<T>;
|
|
1136
|
-
|
|
1137
|
-
type Condition = {
|
|
1138
|
-
/**
|
|
1139
|
-
* 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\".
|
|
1140
|
-
*/
|
|
1141
|
-
pattern?: string;
|
|
1142
|
-
anchoring?: Anchoring;
|
|
1391
|
+
type AutomaticFacetFilter = {
|
|
1143
1392
|
/**
|
|
1144
|
-
*
|
|
1393
|
+
* Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.
|
|
1145
1394
|
*/
|
|
1146
|
-
|
|
1395
|
+
facet: string;
|
|
1147
1396
|
/**
|
|
1148
|
-
*
|
|
1397
|
+
* Filter scores to give different weights to individual filters.
|
|
1149
1398
|
*/
|
|
1150
|
-
|
|
1399
|
+
score?: number;
|
|
1151
1400
|
/**
|
|
1152
|
-
*
|
|
1401
|
+
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation.
|
|
1153
1402
|
*/
|
|
1154
|
-
|
|
1403
|
+
disjunctive?: boolean;
|
|
1155
1404
|
};
|
|
1156
1405
|
|
|
1157
1406
|
/**
|
|
1158
|
-
*
|
|
1407
|
+
* Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies.
|
|
1159
1408
|
*/
|
|
1160
|
-
type
|
|
1161
|
-
/**
|
|
1162
|
-
* Unique record identifier.
|
|
1163
|
-
*/
|
|
1164
|
-
objectID: string;
|
|
1165
|
-
};
|
|
1409
|
+
type AutomaticFacetFilters = Array<AutomaticFacetFilter> | Array<string>;
|
|
1166
1410
|
|
|
1167
1411
|
/**
|
|
1168
1412
|
* Type of edit.
|
|
@@ -1185,11 +1429,11 @@ type ConsequenceQueryObject = {
|
|
|
1185
1429
|
/**
|
|
1186
1430
|
* Words to remove from the search query.
|
|
1187
1431
|
*/
|
|
1188
|
-
remove?: string
|
|
1432
|
+
remove?: Array<string>;
|
|
1189
1433
|
/**
|
|
1190
1434
|
* Changes to make to the search query.
|
|
1191
1435
|
*/
|
|
1192
|
-
edits?: Edit
|
|
1436
|
+
edits?: Array<Edit>;
|
|
1193
1437
|
};
|
|
1194
1438
|
|
|
1195
1439
|
/**
|
|
@@ -1230,14 +1474,14 @@ type PromoteObjectIDs = {
|
|
|
1230
1474
|
/**
|
|
1231
1475
|
* Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results.
|
|
1232
1476
|
*/
|
|
1233
|
-
objectIDs: string
|
|
1477
|
+
objectIDs: Array<string>;
|
|
1234
1478
|
/**
|
|
1235
1479
|
* Position in the search results where you want to show the promoted records.
|
|
1236
1480
|
*/
|
|
1237
1481
|
position: number;
|
|
1238
1482
|
};
|
|
1239
1483
|
|
|
1240
|
-
type Promote =
|
|
1484
|
+
type Promote = PromoteObjectIDs | PromoteObjectID;
|
|
1241
1485
|
|
|
1242
1486
|
/**
|
|
1243
1487
|
* Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
|
|
@@ -1247,7 +1491,7 @@ type Consequence = {
|
|
|
1247
1491
|
/**
|
|
1248
1492
|
* 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.
|
|
1249
1493
|
*/
|
|
1250
|
-
promote?: Promote
|
|
1494
|
+
promote?: Array<Promote>;
|
|
1251
1495
|
/**
|
|
1252
1496
|
* 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.
|
|
1253
1497
|
*/
|
|
@@ -1255,825 +1499,693 @@ type Consequence = {
|
|
|
1255
1499
|
/**
|
|
1256
1500
|
* Records you want to hide from the search results.
|
|
1257
1501
|
*/
|
|
1258
|
-
hide?: ConsequenceHide
|
|
1502
|
+
hide?: Array<ConsequenceHide>;
|
|
1259
1503
|
/**
|
|
1260
1504
|
* 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.
|
|
1261
1505
|
*/
|
|
1262
1506
|
userData?: any | null;
|
|
1263
1507
|
};
|
|
1264
1508
|
|
|
1265
|
-
|
|
1266
|
-
* Response and creation timestamp.
|
|
1267
|
-
*/
|
|
1268
|
-
type CreatedAtResponse = {
|
|
1509
|
+
type TimeRange = {
|
|
1269
1510
|
/**
|
|
1270
|
-
*
|
|
1511
|
+
* When the rule should start to be active, in Unix epoch time.
|
|
1271
1512
|
*/
|
|
1272
|
-
|
|
1273
|
-
};
|
|
1274
|
-
|
|
1275
|
-
type DeleteApiKeyResponse = {
|
|
1513
|
+
from: number;
|
|
1276
1514
|
/**
|
|
1277
|
-
*
|
|
1515
|
+
* When the rule should stop to be active, in Unix epoch time.
|
|
1278
1516
|
*/
|
|
1279
|
-
|
|
1517
|
+
until: number;
|
|
1280
1518
|
};
|
|
1281
1519
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1520
|
+
/**
|
|
1521
|
+
* Rule object.
|
|
1522
|
+
*/
|
|
1523
|
+
type Rule = {
|
|
1284
1524
|
/**
|
|
1285
|
-
*
|
|
1525
|
+
* Unique identifier of a rule object.
|
|
1286
1526
|
*/
|
|
1287
|
-
|
|
1288
|
-
numericFilters?: NumericFilters;
|
|
1289
|
-
tagFilters?: TagFilters;
|
|
1527
|
+
objectID: string;
|
|
1290
1528
|
/**
|
|
1291
|
-
*
|
|
1529
|
+
* Conditions that trigger a rule. Some consequences require specific conditions or don\'t require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).
|
|
1292
1530
|
*/
|
|
1293
|
-
|
|
1294
|
-
|
|
1531
|
+
conditions?: Array<Condition>;
|
|
1532
|
+
consequence?: Consequence;
|
|
1295
1533
|
/**
|
|
1296
|
-
*
|
|
1534
|
+
* Description of the rule\'s purpose to help you distinguish between different rules.
|
|
1297
1535
|
*/
|
|
1298
|
-
|
|
1536
|
+
description?: string;
|
|
1299
1537
|
/**
|
|
1300
|
-
*
|
|
1538
|
+
* Whether the rule is active.
|
|
1301
1539
|
*/
|
|
1302
|
-
|
|
1303
|
-
};
|
|
1304
|
-
|
|
1305
|
-
type DeleteSourceResponse = {
|
|
1540
|
+
enabled?: boolean;
|
|
1306
1541
|
/**
|
|
1307
|
-
*
|
|
1542
|
+
* Time periods when the rule is active.
|
|
1308
1543
|
*/
|
|
1309
|
-
|
|
1544
|
+
validity?: Array<TimeRange>;
|
|
1310
1545
|
};
|
|
1311
1546
|
|
|
1312
|
-
|
|
1313
|
-
* Response, taskID, and deletion timestamp.
|
|
1314
|
-
*/
|
|
1315
|
-
type DeletedAtResponse = {
|
|
1547
|
+
type SaveObjectResponse = {
|
|
1316
1548
|
/**
|
|
1317
|
-
*
|
|
1549
|
+
* Date and time when the object was created, in RFC 3339 format.
|
|
1318
1550
|
*/
|
|
1319
|
-
|
|
1551
|
+
createdAt: string;
|
|
1320
1552
|
/**
|
|
1321
|
-
*
|
|
1553
|
+
* 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`.
|
|
1322
1554
|
*/
|
|
1323
|
-
|
|
1324
|
-
};
|
|
1325
|
-
|
|
1326
|
-
/**
|
|
1327
|
-
* Dictionary type. If `null`, this dictionary type isn\'t supported for the language.
|
|
1328
|
-
*/
|
|
1329
|
-
type DictionaryLanguage = {
|
|
1555
|
+
taskID: number;
|
|
1330
1556
|
/**
|
|
1331
|
-
*
|
|
1557
|
+
* Unique record identifier.
|
|
1332
1558
|
*/
|
|
1333
|
-
|
|
1559
|
+
objectID?: string;
|
|
1334
1560
|
};
|
|
1335
1561
|
|
|
1336
|
-
|
|
1337
|
-
* Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and boolean values.
|
|
1338
|
-
*/
|
|
1339
|
-
type StandardEntries = {
|
|
1562
|
+
type SaveSynonymResponse = {
|
|
1340
1563
|
/**
|
|
1341
|
-
*
|
|
1564
|
+
* 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`.
|
|
1342
1565
|
*/
|
|
1343
|
-
|
|
1566
|
+
taskID: number;
|
|
1344
1567
|
/**
|
|
1345
|
-
*
|
|
1568
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
1346
1569
|
*/
|
|
1347
|
-
|
|
1570
|
+
updatedAt: string;
|
|
1348
1571
|
/**
|
|
1349
|
-
*
|
|
1572
|
+
* Unique identifier of a synonym object.
|
|
1350
1573
|
*/
|
|
1351
|
-
|
|
1574
|
+
id: string;
|
|
1352
1575
|
};
|
|
1353
1576
|
|
|
1354
1577
|
/**
|
|
1355
|
-
*
|
|
1578
|
+
* Whether a dictionary entry is active.
|
|
1356
1579
|
*/
|
|
1357
|
-
type
|
|
1358
|
-
disableStandardEntries: StandardEntries;
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
type DictionaryType = 'compounds' | 'plurals' | 'stopwords';
|
|
1580
|
+
type DictionaryEntryState = 'enabled' | 'disabled';
|
|
1362
1581
|
|
|
1363
1582
|
/**
|
|
1364
|
-
*
|
|
1583
|
+
* Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
|
|
1365
1584
|
*/
|
|
1366
|
-
type
|
|
1367
|
-
message?: string;
|
|
1368
|
-
};
|
|
1369
|
-
|
|
1370
|
-
type FacetHits = {
|
|
1371
|
-
/**
|
|
1372
|
-
* Facet value.
|
|
1373
|
-
*/
|
|
1374
|
-
value: string;
|
|
1375
|
-
/**
|
|
1376
|
-
* Highlighted attribute value, including HTML tags.
|
|
1377
|
-
*/
|
|
1378
|
-
highlighted: string;
|
|
1379
|
-
/**
|
|
1380
|
-
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
|
|
1381
|
-
*/
|
|
1382
|
-
count: number;
|
|
1383
|
-
};
|
|
1585
|
+
type DictionaryEntryType = 'custom' | 'standard';
|
|
1384
1586
|
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
name: string;
|
|
1390
|
-
/**
|
|
1391
|
-
* Index creation date. An empty string means that the index has no records.
|
|
1392
|
-
*/
|
|
1393
|
-
createdAt: string;
|
|
1394
|
-
/**
|
|
1395
|
-
* Date and time when the object was updated, in RFC 3339 format.
|
|
1396
|
-
*/
|
|
1397
|
-
updatedAt: string;
|
|
1398
|
-
/**
|
|
1399
|
-
* Number of records contained in the index.
|
|
1400
|
-
*/
|
|
1401
|
-
entries: number;
|
|
1587
|
+
/**
|
|
1588
|
+
* Dictionary entry.
|
|
1589
|
+
*/
|
|
1590
|
+
type DictionaryEntry = Record<string, any> & {
|
|
1402
1591
|
/**
|
|
1403
|
-
*
|
|
1592
|
+
* Unique identifier for the dictionary entry.
|
|
1404
1593
|
*/
|
|
1405
|
-
|
|
1594
|
+
objectID: string;
|
|
1595
|
+
language?: SupportedLanguage;
|
|
1406
1596
|
/**
|
|
1407
|
-
*
|
|
1597
|
+
* Matching dictionary word for `stopwords` and `compounds` dictionaries.
|
|
1408
1598
|
*/
|
|
1409
|
-
|
|
1599
|
+
word?: string;
|
|
1410
1600
|
/**
|
|
1411
|
-
*
|
|
1601
|
+
* Matching words in the `plurals` dictionary including declensions.
|
|
1412
1602
|
*/
|
|
1413
|
-
|
|
1603
|
+
words?: Array<string>;
|
|
1414
1604
|
/**
|
|
1415
|
-
*
|
|
1605
|
+
* Invividual components of a compound word in the `compounds` dictionary.
|
|
1416
1606
|
*/
|
|
1417
|
-
|
|
1607
|
+
decomposition?: Array<string>;
|
|
1608
|
+
state?: DictionaryEntryState;
|
|
1609
|
+
type?: DictionaryEntryType;
|
|
1610
|
+
};
|
|
1611
|
+
|
|
1612
|
+
type SearchDictionaryEntriesResponse = {
|
|
1418
1613
|
/**
|
|
1419
|
-
*
|
|
1614
|
+
* Dictionary entries matching the search criteria.
|
|
1420
1615
|
*/
|
|
1421
|
-
|
|
1616
|
+
hits: Array<DictionaryEntry>;
|
|
1422
1617
|
/**
|
|
1423
|
-
*
|
|
1618
|
+
* Requested page of the API response.
|
|
1424
1619
|
*/
|
|
1425
|
-
|
|
1620
|
+
page: number;
|
|
1426
1621
|
/**
|
|
1427
|
-
*
|
|
1622
|
+
* Number of results (hits).
|
|
1428
1623
|
*/
|
|
1429
|
-
|
|
1624
|
+
nbHits: number;
|
|
1430
1625
|
/**
|
|
1431
|
-
*
|
|
1626
|
+
* Number of pages of results.
|
|
1432
1627
|
*/
|
|
1433
|
-
|
|
1434
|
-
};
|
|
1435
|
-
|
|
1436
|
-
type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
|
|
1437
|
-
|
|
1438
|
-
type GetDictionarySettingsResponse = {
|
|
1439
|
-
disableStandardEntries: StandardEntries;
|
|
1628
|
+
nbPages: number;
|
|
1440
1629
|
};
|
|
1441
1630
|
|
|
1442
|
-
type
|
|
1631
|
+
type FacetHits = {
|
|
1443
1632
|
/**
|
|
1444
|
-
*
|
|
1633
|
+
* Facet value.
|
|
1445
1634
|
*/
|
|
1446
|
-
|
|
1635
|
+
value: string;
|
|
1447
1636
|
/**
|
|
1448
|
-
*
|
|
1637
|
+
* Highlighted attribute value, including HTML tags.
|
|
1449
1638
|
*/
|
|
1450
|
-
|
|
1639
|
+
highlighted: string;
|
|
1451
1640
|
/**
|
|
1452
|
-
*
|
|
1641
|
+
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
|
|
1453
1642
|
*/
|
|
1454
|
-
|
|
1643
|
+
count: number;
|
|
1455
1644
|
};
|
|
1456
1645
|
|
|
1457
|
-
type
|
|
1458
|
-
/**
|
|
1459
|
-
* Date and time of the API request, in RFC 3339 format.
|
|
1460
|
-
*/
|
|
1461
|
-
timestamp: string;
|
|
1462
|
-
/**
|
|
1463
|
-
* HTTP method of the request.
|
|
1464
|
-
*/
|
|
1465
|
-
method: string;
|
|
1466
|
-
/**
|
|
1467
|
-
* HTTP status code of the response.
|
|
1468
|
-
*/
|
|
1469
|
-
answer_code: string;
|
|
1470
|
-
/**
|
|
1471
|
-
* Request body.
|
|
1472
|
-
*/
|
|
1473
|
-
query_body: string;
|
|
1474
|
-
/**
|
|
1475
|
-
* Response body.
|
|
1476
|
-
*/
|
|
1477
|
-
answer: string;
|
|
1478
|
-
/**
|
|
1479
|
-
* URL of the API endpoint.
|
|
1480
|
-
*/
|
|
1481
|
-
url: string;
|
|
1482
|
-
/**
|
|
1483
|
-
* IP address of the client that performed the request.
|
|
1484
|
-
*/
|
|
1485
|
-
ip: string;
|
|
1486
|
-
/**
|
|
1487
|
-
* Request headers (API keys are obfuscated).
|
|
1488
|
-
*/
|
|
1489
|
-
query_headers: string;
|
|
1646
|
+
type SearchForFacetValuesResponse = {
|
|
1490
1647
|
/**
|
|
1491
|
-
*
|
|
1648
|
+
* Matching facet values.
|
|
1492
1649
|
*/
|
|
1493
|
-
|
|
1650
|
+
facetHits: Array<FacetHits>;
|
|
1494
1651
|
/**
|
|
1495
|
-
*
|
|
1652
|
+
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
|
|
1496
1653
|
*/
|
|
1497
|
-
|
|
1654
|
+
exhaustiveFacetsCount: boolean;
|
|
1498
1655
|
/**
|
|
1499
|
-
*
|
|
1656
|
+
* Time the server took to process the request, in milliseconds.
|
|
1500
1657
|
*/
|
|
1501
|
-
|
|
1658
|
+
processingTimeMS?: number;
|
|
1659
|
+
};
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
1663
|
+
*/
|
|
1664
|
+
type SearchTypeFacet = 'facet';
|
|
1665
|
+
|
|
1666
|
+
type SearchForFacetsOptions = {
|
|
1502
1667
|
/**
|
|
1503
|
-
*
|
|
1668
|
+
* Facet name.
|
|
1504
1669
|
*/
|
|
1505
|
-
|
|
1670
|
+
facet: string;
|
|
1506
1671
|
/**
|
|
1507
|
-
*
|
|
1672
|
+
* Index name (case-sensitive).
|
|
1508
1673
|
*/
|
|
1509
|
-
|
|
1674
|
+
indexName: string;
|
|
1510
1675
|
/**
|
|
1511
|
-
*
|
|
1676
|
+
* Text to search inside the facet\'s values.
|
|
1512
1677
|
*/
|
|
1513
|
-
|
|
1678
|
+
facetQuery?: string;
|
|
1514
1679
|
/**
|
|
1515
|
-
*
|
|
1680
|
+
* 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).
|
|
1516
1681
|
*/
|
|
1517
|
-
|
|
1682
|
+
maxFacetHits?: number;
|
|
1683
|
+
type: SearchTypeFacet;
|
|
1518
1684
|
};
|
|
1519
1685
|
|
|
1520
|
-
type
|
|
1521
|
-
|
|
1686
|
+
type SearchParamsQuery = {
|
|
1687
|
+
/**
|
|
1688
|
+
* Search query.
|
|
1689
|
+
*/
|
|
1690
|
+
query?: string;
|
|
1522
1691
|
};
|
|
1523
1692
|
|
|
1693
|
+
type BaseSearchParams = SearchParamsQuery & BaseSearchParamsWithoutQuery;
|
|
1694
|
+
|
|
1524
1695
|
/**
|
|
1525
|
-
*
|
|
1696
|
+
* Each parameter value, including the `query` must not be larger than 512 bytes.
|
|
1526
1697
|
*/
|
|
1527
|
-
type
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
* Object ID for the record to retrieve.
|
|
1534
|
-
*/
|
|
1535
|
-
objectID: string;
|
|
1698
|
+
type SearchParamsObject = BaseSearchParams & IndexSettingsAsSearchParams;
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Search parameters as query string.
|
|
1702
|
+
*/
|
|
1703
|
+
type SearchParamsString = {
|
|
1536
1704
|
/**
|
|
1537
|
-
*
|
|
1705
|
+
* Search parameters as a URL-encoded query string.
|
|
1538
1706
|
*/
|
|
1539
|
-
|
|
1707
|
+
params?: string;
|
|
1540
1708
|
};
|
|
1541
1709
|
|
|
1710
|
+
type SearchParams = SearchParamsString | SearchParamsObject;
|
|
1711
|
+
|
|
1712
|
+
type SearchForFacets = SearchParams & SearchForFacetsOptions;
|
|
1713
|
+
|
|
1542
1714
|
/**
|
|
1543
|
-
*
|
|
1715
|
+
* - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
1544
1716
|
*/
|
|
1545
|
-
type
|
|
1546
|
-
requests: GetObjectsRequest[];
|
|
1547
|
-
};
|
|
1717
|
+
type SearchTypeDefault = 'default';
|
|
1548
1718
|
|
|
1549
|
-
type
|
|
1719
|
+
type SearchForHitsOptions = {
|
|
1550
1720
|
/**
|
|
1551
|
-
*
|
|
1721
|
+
* Index name (case-sensitive).
|
|
1552
1722
|
*/
|
|
1553
|
-
|
|
1723
|
+
indexName: string;
|
|
1724
|
+
type?: SearchTypeDefault;
|
|
1725
|
+
} & {
|
|
1726
|
+
facet?: never;
|
|
1727
|
+
maxFacetHits?: never;
|
|
1728
|
+
facetQuery?: never;
|
|
1554
1729
|
};
|
|
1555
1730
|
|
|
1731
|
+
type SearchForHits = SearchParams & SearchForHitsOptions;
|
|
1732
|
+
|
|
1733
|
+
type SearchQuery = SearchForHits | SearchForFacets;
|
|
1734
|
+
|
|
1556
1735
|
/**
|
|
1557
|
-
*
|
|
1736
|
+
* Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results.
|
|
1558
1737
|
*/
|
|
1559
|
-
type
|
|
1738
|
+
type SearchStrategy = 'none' | 'stopIfEnoughMatches';
|
|
1560
1739
|
|
|
1561
|
-
type
|
|
1562
|
-
|
|
1740
|
+
type SearchMethodParams = {
|
|
1741
|
+
requests: Array<SearchQuery>;
|
|
1742
|
+
strategy?: SearchStrategy;
|
|
1563
1743
|
};
|
|
1564
1744
|
|
|
1565
|
-
|
|
1566
|
-
* Unique user ID.
|
|
1567
|
-
*/
|
|
1568
|
-
type UserId = {
|
|
1745
|
+
type SearchPagination = {
|
|
1569
1746
|
/**
|
|
1570
|
-
*
|
|
1747
|
+
* Page of search results to retrieve.
|
|
1571
1748
|
*/
|
|
1572
|
-
|
|
1749
|
+
page?: number;
|
|
1573
1750
|
/**
|
|
1574
|
-
*
|
|
1751
|
+
* Number of results (hits).
|
|
1575
1752
|
*/
|
|
1576
|
-
|
|
1753
|
+
nbHits?: number;
|
|
1577
1754
|
/**
|
|
1578
|
-
* Number of
|
|
1755
|
+
* Number of pages of results.
|
|
1579
1756
|
*/
|
|
1580
|
-
|
|
1757
|
+
nbPages?: number;
|
|
1581
1758
|
/**
|
|
1582
|
-
*
|
|
1759
|
+
* Number of hits per page.
|
|
1583
1760
|
*/
|
|
1584
|
-
|
|
1761
|
+
hitsPerPage?: number;
|
|
1585
1762
|
};
|
|
1586
1763
|
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
*/
|
|
1594
|
-
topUsers: Array<Record<string, UserId[]>>;
|
|
1764
|
+
type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
|
|
1765
|
+
|
|
1766
|
+
type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;
|
|
1767
|
+
|
|
1768
|
+
type SearchResponses<T = Record<string, any>> = {
|
|
1769
|
+
results: SearchResult<T>[];
|
|
1595
1770
|
};
|
|
1596
1771
|
|
|
1597
|
-
type
|
|
1772
|
+
type SearchRulesResponse = {
|
|
1598
1773
|
/**
|
|
1599
|
-
*
|
|
1774
|
+
* Rules that matched the search criteria.
|
|
1600
1775
|
*/
|
|
1601
|
-
|
|
1776
|
+
hits: Array<Rule>;
|
|
1602
1777
|
/**
|
|
1603
|
-
*
|
|
1778
|
+
* Number of rules that matched the search criteria.
|
|
1779
|
+
*/
|
|
1780
|
+
nbHits: number;
|
|
1781
|
+
/**
|
|
1782
|
+
* Current page.
|
|
1783
|
+
*/
|
|
1784
|
+
page: number;
|
|
1785
|
+
/**
|
|
1786
|
+
* Number of pages.
|
|
1604
1787
|
*/
|
|
1605
|
-
|
|
1788
|
+
nbPages: number;
|
|
1606
1789
|
};
|
|
1607
1790
|
|
|
1608
1791
|
/**
|
|
1609
|
-
*
|
|
1792
|
+
* Synonym type.
|
|
1610
1793
|
*/
|
|
1611
|
-
type
|
|
1794
|
+
type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder';
|
|
1612
1795
|
|
|
1613
1796
|
/**
|
|
1614
|
-
*
|
|
1797
|
+
* Synonym object.
|
|
1615
1798
|
*/
|
|
1616
|
-
type
|
|
1617
|
-
plurals: DictionaryLanguage | null;
|
|
1618
|
-
stopwords: DictionaryLanguage | null;
|
|
1619
|
-
compounds: DictionaryLanguage | null;
|
|
1620
|
-
};
|
|
1621
|
-
|
|
1622
|
-
type ListApiKeysResponse = {
|
|
1799
|
+
type SynonymHit = {
|
|
1623
1800
|
/**
|
|
1624
|
-
*
|
|
1801
|
+
* Unique identifier of a synonym object.
|
|
1625
1802
|
*/
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
/**
|
|
1630
|
-
* Clusters.
|
|
1631
|
-
*/
|
|
1632
|
-
type ListClustersResponse = {
|
|
1803
|
+
objectID: string;
|
|
1804
|
+
type: SynonymType;
|
|
1633
1805
|
/**
|
|
1634
|
-
*
|
|
1806
|
+
* Words or phrases considered equivalent.
|
|
1635
1807
|
*/
|
|
1636
|
-
|
|
1637
|
-
};
|
|
1638
|
-
|
|
1639
|
-
type ListIndicesResponse = {
|
|
1808
|
+
synonyms?: Array<string>;
|
|
1640
1809
|
/**
|
|
1641
|
-
*
|
|
1810
|
+
* Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)).
|
|
1642
1811
|
*/
|
|
1643
|
-
|
|
1812
|
+
input?: string;
|
|
1644
1813
|
/**
|
|
1645
|
-
*
|
|
1814
|
+
* Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)).
|
|
1646
1815
|
*/
|
|
1647
|
-
|
|
1648
|
-
};
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* User ID data.
|
|
1652
|
-
*/
|
|
1653
|
-
type ListUserIdsResponse = {
|
|
1816
|
+
word?: string;
|
|
1654
1817
|
/**
|
|
1655
|
-
*
|
|
1818
|
+
* Words to be matched in records.
|
|
1656
1819
|
*/
|
|
1657
|
-
|
|
1658
|
-
};
|
|
1659
|
-
|
|
1660
|
-
type LogType = 'all' | 'build' | 'error' | 'query';
|
|
1661
|
-
|
|
1662
|
-
type MultipleBatchResponse = {
|
|
1820
|
+
corrections?: Array<string>;
|
|
1663
1821
|
/**
|
|
1664
|
-
*
|
|
1822
|
+
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) to be put inside records.
|
|
1665
1823
|
*/
|
|
1666
|
-
|
|
1824
|
+
placeholder?: string;
|
|
1667
1825
|
/**
|
|
1668
|
-
*
|
|
1826
|
+
* Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
|
|
1669
1827
|
*/
|
|
1670
|
-
|
|
1828
|
+
replacements?: Array<string>;
|
|
1671
1829
|
};
|
|
1672
1830
|
|
|
1673
|
-
|
|
1674
|
-
* Operation to perform on the index.
|
|
1675
|
-
*/
|
|
1676
|
-
type OperationType = 'copy' | 'move';
|
|
1677
|
-
|
|
1678
|
-
type ScopeType = 'rules' | 'settings' | 'synonyms';
|
|
1679
|
-
|
|
1680
|
-
type OperationIndexParams = {
|
|
1681
|
-
operation: OperationType;
|
|
1682
|
-
/**
|
|
1683
|
-
* Index name (case-sensitive).
|
|
1684
|
-
*/
|
|
1685
|
-
destination: string;
|
|
1831
|
+
type SearchSynonymsResponse = Record<string, any> & {
|
|
1686
1832
|
/**
|
|
1687
|
-
*
|
|
1833
|
+
* Matching synonyms.
|
|
1688
1834
|
*/
|
|
1689
|
-
|
|
1690
|
-
};
|
|
1691
|
-
|
|
1692
|
-
type RemoveUserIdResponse = {
|
|
1835
|
+
hits: Array<SynonymHit>;
|
|
1693
1836
|
/**
|
|
1694
|
-
*
|
|
1837
|
+
* Number of results (hits).
|
|
1695
1838
|
*/
|
|
1696
|
-
|
|
1839
|
+
nbHits: number;
|
|
1697
1840
|
};
|
|
1698
1841
|
|
|
1699
1842
|
/**
|
|
1700
|
-
*
|
|
1843
|
+
* OK
|
|
1701
1844
|
*/
|
|
1702
|
-
type
|
|
1845
|
+
type SearchUserIdsParams = {
|
|
1703
1846
|
/**
|
|
1704
|
-
*
|
|
1847
|
+
* Query to search. The search is a prefix search with [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) enabled. An empty query will retrieve all users.
|
|
1705
1848
|
*/
|
|
1706
|
-
|
|
1849
|
+
query: string;
|
|
1707
1850
|
/**
|
|
1708
|
-
*
|
|
1851
|
+
* Cluster name.
|
|
1709
1852
|
*/
|
|
1710
|
-
|
|
1711
|
-
};
|
|
1712
|
-
|
|
1713
|
-
type ReplaceAllObjectsResponse = {
|
|
1714
|
-
copyOperationResponse: UpdatedAtResponse;
|
|
1853
|
+
clusterName?: string;
|
|
1715
1854
|
/**
|
|
1716
|
-
*
|
|
1855
|
+
* Page of search results to retrieve.
|
|
1717
1856
|
*/
|
|
1718
|
-
|
|
1719
|
-
moveOperationResponse: UpdatedAtResponse;
|
|
1720
|
-
};
|
|
1721
|
-
|
|
1722
|
-
type ReplaceSourceResponse = {
|
|
1857
|
+
page?: number;
|
|
1723
1858
|
/**
|
|
1724
|
-
*
|
|
1859
|
+
* Number of hits per page.
|
|
1725
1860
|
*/
|
|
1726
|
-
|
|
1861
|
+
hitsPerPage?: number;
|
|
1727
1862
|
};
|
|
1728
1863
|
|
|
1729
|
-
type
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
*/
|
|
1733
|
-
from: number;
|
|
1734
|
-
/**
|
|
1735
|
-
* When the rule should stop to be active, in Unix epoch time.
|
|
1736
|
-
*/
|
|
1737
|
-
until: number;
|
|
1864
|
+
type UserHighlightResult = {
|
|
1865
|
+
userID: HighlightResult;
|
|
1866
|
+
clusterName: HighlightResult;
|
|
1738
1867
|
};
|
|
1739
1868
|
|
|
1740
|
-
|
|
1741
|
-
* Rule object.
|
|
1742
|
-
*/
|
|
1743
|
-
type Rule = {
|
|
1869
|
+
type UserHit = {
|
|
1744
1870
|
/**
|
|
1745
|
-
* Unique identifier of
|
|
1871
|
+
* Unique identifier of the user who makes the search request.
|
|
1746
1872
|
*/
|
|
1747
|
-
|
|
1873
|
+
userID: string;
|
|
1748
1874
|
/**
|
|
1749
|
-
*
|
|
1875
|
+
* Cluster name.
|
|
1750
1876
|
*/
|
|
1751
|
-
|
|
1752
|
-
consequence?: Consequence;
|
|
1877
|
+
clusterName: string;
|
|
1753
1878
|
/**
|
|
1754
|
-
*
|
|
1879
|
+
* Number of records in the cluster.
|
|
1755
1880
|
*/
|
|
1756
|
-
|
|
1881
|
+
nbRecords: number;
|
|
1757
1882
|
/**
|
|
1758
|
-
*
|
|
1883
|
+
* Data size taken by all the users assigned to the cluster.
|
|
1759
1884
|
*/
|
|
1760
|
-
|
|
1885
|
+
dataSize: number;
|
|
1761
1886
|
/**
|
|
1762
|
-
*
|
|
1887
|
+
* userID of the requested user. Same as userID.
|
|
1763
1888
|
*/
|
|
1764
|
-
|
|
1889
|
+
objectID: string;
|
|
1890
|
+
_highlightResult: UserHighlightResult;
|
|
1765
1891
|
};
|
|
1766
1892
|
|
|
1767
|
-
|
|
1893
|
+
/**
|
|
1894
|
+
* userIDs data.
|
|
1895
|
+
*/
|
|
1896
|
+
type SearchUserIdsResponse = {
|
|
1768
1897
|
/**
|
|
1769
|
-
*
|
|
1898
|
+
* User objects that match the query.
|
|
1770
1899
|
*/
|
|
1771
|
-
|
|
1900
|
+
hits: Array<UserHit>;
|
|
1772
1901
|
/**
|
|
1773
|
-
*
|
|
1902
|
+
* Number of results (hits).
|
|
1774
1903
|
*/
|
|
1775
|
-
|
|
1904
|
+
nbHits: number;
|
|
1776
1905
|
/**
|
|
1777
|
-
*
|
|
1906
|
+
* Page of search results to retrieve.
|
|
1778
1907
|
*/
|
|
1779
|
-
|
|
1780
|
-
};
|
|
1781
|
-
|
|
1782
|
-
type SaveSynonymResponse = {
|
|
1908
|
+
page: number;
|
|
1783
1909
|
/**
|
|
1784
|
-
*
|
|
1910
|
+
* Maximum number of hits per page.
|
|
1785
1911
|
*/
|
|
1786
|
-
|
|
1912
|
+
hitsPerPage: number;
|
|
1787
1913
|
/**
|
|
1788
1914
|
* Date and time when the object was updated, in RFC 3339 format.
|
|
1789
1915
|
*/
|
|
1790
1916
|
updatedAt: string;
|
|
1791
|
-
/**
|
|
1792
|
-
* Unique identifier of a synonym object.
|
|
1793
|
-
*/
|
|
1794
|
-
id: string;
|
|
1795
1917
|
};
|
|
1796
1918
|
|
|
1797
|
-
|
|
1798
|
-
* Search parameter.
|
|
1799
|
-
*/
|
|
1800
|
-
type SearchDictionaryEntriesParams = {
|
|
1919
|
+
type BaseIndexSettings = {
|
|
1801
1920
|
/**
|
|
1802
|
-
*
|
|
1921
|
+
* 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))`.
|
|
1803
1922
|
*/
|
|
1804
|
-
|
|
1923
|
+
attributesForFaceting?: Array<string>;
|
|
1805
1924
|
/**
|
|
1806
|
-
*
|
|
1925
|
+
* 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/).
|
|
1807
1926
|
*/
|
|
1808
|
-
|
|
1927
|
+
replicas?: Array<string>;
|
|
1809
1928
|
/**
|
|
1810
|
-
*
|
|
1929
|
+
* 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.
|
|
1811
1930
|
*/
|
|
1812
|
-
|
|
1813
|
-
language?: SupportedLanguage;
|
|
1814
|
-
};
|
|
1815
|
-
|
|
1816
|
-
type SearchDictionaryEntriesResponse = {
|
|
1931
|
+
paginationLimitedTo?: number;
|
|
1817
1932
|
/**
|
|
1818
|
-
*
|
|
1933
|
+
* 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.
|
|
1819
1934
|
*/
|
|
1820
|
-
|
|
1935
|
+
unretrievableAttributes?: Array<string>;
|
|
1821
1936
|
/**
|
|
1822
|
-
*
|
|
1937
|
+
* 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.
|
|
1823
1938
|
*/
|
|
1824
|
-
|
|
1939
|
+
disableTypoToleranceOnWords?: Array<string>;
|
|
1825
1940
|
/**
|
|
1826
|
-
*
|
|
1941
|
+
* 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.
|
|
1827
1942
|
*/
|
|
1828
|
-
|
|
1943
|
+
attributesToTransliterate?: Array<string>;
|
|
1829
1944
|
/**
|
|
1830
|
-
*
|
|
1945
|
+
* Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
|
|
1831
1946
|
*/
|
|
1832
|
-
|
|
1833
|
-
};
|
|
1834
|
-
|
|
1835
|
-
type SearchForFacetValuesRequest = {
|
|
1947
|
+
camelCaseAttributes?: Array<string>;
|
|
1836
1948
|
/**
|
|
1837
|
-
*
|
|
1949
|
+
* 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).
|
|
1838
1950
|
*/
|
|
1839
|
-
|
|
1951
|
+
decompoundedAttributes?: Record<string, unknown>;
|
|
1840
1952
|
/**
|
|
1841
|
-
*
|
|
1953
|
+
* 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/).
|
|
1842
1954
|
*/
|
|
1843
|
-
|
|
1955
|
+
indexLanguages?: Array<SupportedLanguage>;
|
|
1844
1956
|
/**
|
|
1845
|
-
*
|
|
1957
|
+
* 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.
|
|
1846
1958
|
*/
|
|
1847
|
-
|
|
1848
|
-
};
|
|
1849
|
-
|
|
1850
|
-
type SearchForFacetValuesResponse = {
|
|
1959
|
+
disablePrefixOnAttributes?: Array<string>;
|
|
1851
1960
|
/**
|
|
1852
|
-
*
|
|
1961
|
+
* Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
|
1853
1962
|
*/
|
|
1854
|
-
|
|
1963
|
+
allowCompressionOfIntegerArray?: boolean;
|
|
1855
1964
|
/**
|
|
1856
|
-
*
|
|
1965
|
+
* 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 `!=`.
|
|
1857
1966
|
*/
|
|
1858
|
-
|
|
1967
|
+
numericAttributesForFiltering?: Array<string>;
|
|
1859
1968
|
/**
|
|
1860
|
-
*
|
|
1969
|
+
* 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.
|
|
1861
1970
|
*/
|
|
1862
|
-
|
|
1863
|
-
};
|
|
1864
|
-
|
|
1865
|
-
/**
|
|
1866
|
-
* - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
1867
|
-
*/
|
|
1868
|
-
type SearchTypeFacet = 'facet';
|
|
1869
|
-
|
|
1870
|
-
type SearchForFacetsOptions = {
|
|
1971
|
+
separatorsToIndex?: string;
|
|
1871
1972
|
/**
|
|
1872
|
-
*
|
|
1973
|
+
* 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.
|
|
1873
1974
|
*/
|
|
1874
|
-
|
|
1975
|
+
searchableAttributes?: Array<string>;
|
|
1875
1976
|
/**
|
|
1876
|
-
*
|
|
1977
|
+
* An object with custom data. You can store up to 32kB as custom data.
|
|
1877
1978
|
*/
|
|
1878
|
-
|
|
1979
|
+
userData?: Record<string, unknown>;
|
|
1879
1980
|
/**
|
|
1880
|
-
*
|
|
1981
|
+
* 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/).
|
|
1881
1982
|
*/
|
|
1882
|
-
|
|
1983
|
+
customNormalization?: {
|
|
1984
|
+
[key: string]: {
|
|
1985
|
+
[key: string]: string;
|
|
1986
|
+
};
|
|
1987
|
+
};
|
|
1883
1988
|
/**
|
|
1884
|
-
*
|
|
1989
|
+
* 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.
|
|
1885
1990
|
*/
|
|
1886
|
-
|
|
1887
|
-
type: SearchTypeFacet;
|
|
1991
|
+
attributeForDistinct?: string;
|
|
1888
1992
|
};
|
|
1889
1993
|
|
|
1890
|
-
type SearchParams = SearchParamsObject | SearchParamsString;
|
|
1891
|
-
|
|
1892
|
-
type SearchForFacets = SearchForFacetsOptions & SearchParams;
|
|
1893
|
-
|
|
1894
1994
|
/**
|
|
1895
|
-
*
|
|
1995
|
+
* Index settings.
|
|
1896
1996
|
*/
|
|
1897
|
-
type
|
|
1997
|
+
type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams;
|
|
1898
1998
|
|
|
1899
|
-
type
|
|
1999
|
+
type WithPrimary = {
|
|
1900
2000
|
/**
|
|
1901
|
-
*
|
|
2001
|
+
* Replica indices only: the name of the primary index for this replica.
|
|
1902
2002
|
*/
|
|
1903
|
-
|
|
1904
|
-
type?: SearchTypeDefault;
|
|
1905
|
-
} & {
|
|
1906
|
-
facet?: never;
|
|
1907
|
-
maxFacetHits?: never;
|
|
1908
|
-
facetQuery?: never;
|
|
2003
|
+
primary?: string;
|
|
1909
2004
|
};
|
|
1910
2005
|
|
|
1911
|
-
type
|
|
1912
|
-
|
|
1913
|
-
type SearchQuery = SearchForFacets | SearchForHits;
|
|
2006
|
+
type SettingsResponse = IndexSettings & WithPrimary;
|
|
1914
2007
|
|
|
1915
2008
|
/**
|
|
1916
|
-
*
|
|
2009
|
+
* Source.
|
|
1917
2010
|
*/
|
|
1918
|
-
type
|
|
1919
|
-
|
|
1920
|
-
type SearchMethodParams = {
|
|
1921
|
-
requests: SearchQuery[];
|
|
1922
|
-
strategy?: SearchStrategy;
|
|
1923
|
-
};
|
|
1924
|
-
|
|
1925
|
-
type SearchPagination = {
|
|
2011
|
+
type Source = {
|
|
1926
2012
|
/**
|
|
1927
|
-
*
|
|
2013
|
+
* IP address range of the source.
|
|
1928
2014
|
*/
|
|
1929
|
-
|
|
2015
|
+
source: string;
|
|
1930
2016
|
/**
|
|
1931
|
-
*
|
|
2017
|
+
* Source description.
|
|
1932
2018
|
*/
|
|
1933
|
-
|
|
2019
|
+
description?: string;
|
|
2020
|
+
};
|
|
2021
|
+
|
|
2022
|
+
type UpdateApiKeyResponse = {
|
|
1934
2023
|
/**
|
|
1935
|
-
*
|
|
2024
|
+
* API key.
|
|
1936
2025
|
*/
|
|
1937
|
-
|
|
2026
|
+
key: string;
|
|
1938
2027
|
/**
|
|
1939
|
-
*
|
|
2028
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
1940
2029
|
*/
|
|
1941
|
-
|
|
1942
|
-
};
|
|
1943
|
-
|
|
1944
|
-
type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
|
|
1945
|
-
|
|
1946
|
-
type SearchResult<T = Record<string, any>> = SearchForFacetValuesResponse | SearchResponse<T>;
|
|
1947
|
-
|
|
1948
|
-
type SearchResponses<T = Record<string, any>> = {
|
|
1949
|
-
results: Array<SearchResult<T>>;
|
|
2030
|
+
updatedAt: string;
|
|
1950
2031
|
};
|
|
1951
2032
|
|
|
1952
2033
|
/**
|
|
1953
|
-
*
|
|
2034
|
+
* Response, taskID, unique object identifier, and an update timestamp.
|
|
1954
2035
|
*/
|
|
1955
|
-
type
|
|
1956
|
-
/**
|
|
1957
|
-
* Search query for rules.
|
|
1958
|
-
*/
|
|
1959
|
-
query?: string;
|
|
1960
|
-
anchoring?: Anchoring;
|
|
1961
|
-
/**
|
|
1962
|
-
* Only return rules that match the context (exact match).
|
|
1963
|
-
*/
|
|
1964
|
-
context?: string;
|
|
2036
|
+
type UpdatedAtWithObjectIdResponse = {
|
|
1965
2037
|
/**
|
|
1966
|
-
*
|
|
2038
|
+
* 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`.
|
|
1967
2039
|
*/
|
|
1968
|
-
|
|
2040
|
+
taskID?: number;
|
|
1969
2041
|
/**
|
|
1970
|
-
*
|
|
2042
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
1971
2043
|
*/
|
|
1972
|
-
|
|
2044
|
+
updatedAt?: string;
|
|
1973
2045
|
/**
|
|
1974
|
-
*
|
|
2046
|
+
* Unique record identifier.
|
|
1975
2047
|
*/
|
|
1976
|
-
|
|
2048
|
+
objectID?: string;
|
|
1977
2049
|
};
|
|
1978
2050
|
|
|
1979
|
-
type
|
|
1980
|
-
/**
|
|
1981
|
-
* Rules that matched the search criteria.
|
|
1982
|
-
*/
|
|
1983
|
-
hits: Rule[];
|
|
2051
|
+
type UpdatedRuleResponse = {
|
|
1984
2052
|
/**
|
|
1985
|
-
*
|
|
2053
|
+
* Unique identifier of a rule object.
|
|
1986
2054
|
*/
|
|
1987
|
-
|
|
2055
|
+
objectID: string;
|
|
1988
2056
|
/**
|
|
1989
|
-
*
|
|
2057
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
1990
2058
|
*/
|
|
1991
|
-
|
|
2059
|
+
updatedAt: string;
|
|
1992
2060
|
/**
|
|
1993
|
-
*
|
|
2061
|
+
* 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`.
|
|
1994
2062
|
*/
|
|
1995
|
-
|
|
2063
|
+
taskID: number;
|
|
1996
2064
|
};
|
|
1997
2065
|
|
|
2066
|
+
type ApiKeyOperation = 'add' | 'delete' | 'update';
|
|
2067
|
+
|
|
1998
2068
|
/**
|
|
1999
|
-
*
|
|
2069
|
+
* Assign userID parameters.
|
|
2000
2070
|
*/
|
|
2001
|
-
type
|
|
2002
|
-
|
|
2003
|
-
type SearchSynonymsParams = {
|
|
2071
|
+
type AssignUserIdParams = {
|
|
2004
2072
|
/**
|
|
2005
|
-
*
|
|
2073
|
+
* Cluster name.
|
|
2006
2074
|
*/
|
|
2007
|
-
|
|
2008
|
-
|
|
2075
|
+
cluster: string;
|
|
2076
|
+
};
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* Assign userID parameters.
|
|
2080
|
+
*/
|
|
2081
|
+
type BatchAssignUserIdsParams = {
|
|
2009
2082
|
/**
|
|
2010
|
-
*
|
|
2083
|
+
* Cluster name.
|
|
2011
2084
|
*/
|
|
2012
|
-
|
|
2085
|
+
cluster: string;
|
|
2013
2086
|
/**
|
|
2014
|
-
*
|
|
2087
|
+
* User IDs to assign.
|
|
2015
2088
|
*/
|
|
2016
|
-
|
|
2089
|
+
users: Array<string>;
|
|
2017
2090
|
};
|
|
2018
2091
|
|
|
2019
2092
|
/**
|
|
2020
|
-
*
|
|
2093
|
+
* Actions to perform.
|
|
2021
2094
|
*/
|
|
2022
|
-
type
|
|
2095
|
+
type DictionaryAction = 'addEntry' | 'deleteEntry';
|
|
2096
|
+
|
|
2097
|
+
type BatchDictionaryEntriesRequest = {
|
|
2098
|
+
action: DictionaryAction;
|
|
2099
|
+
body: DictionaryEntry;
|
|
2100
|
+
};
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* Request body for updating dictionary entries.
|
|
2104
|
+
*/
|
|
2105
|
+
type BatchDictionaryEntriesParams = {
|
|
2023
2106
|
/**
|
|
2024
|
-
*
|
|
2107
|
+
* Whether to replace all custom entries in the dictionary with the ones sent with this request.
|
|
2025
2108
|
*/
|
|
2026
|
-
|
|
2027
|
-
type: SynonymType;
|
|
2109
|
+
clearExistingDictionaryEntries?: boolean;
|
|
2028
2110
|
/**
|
|
2029
|
-
*
|
|
2111
|
+
* List of additions and deletions to your dictionaries.
|
|
2030
2112
|
*/
|
|
2031
|
-
|
|
2113
|
+
requests: Array<BatchDictionaryEntriesRequest>;
|
|
2114
|
+
};
|
|
2115
|
+
|
|
2116
|
+
type BatchRequest = {
|
|
2117
|
+
action: Action;
|
|
2032
2118
|
/**
|
|
2033
|
-
*
|
|
2119
|
+
* Operation arguments (varies with specified `action`).
|
|
2034
2120
|
*/
|
|
2035
|
-
|
|
2121
|
+
body: Record<string, unknown>;
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
/**
|
|
2125
|
+
* Batch parameters.
|
|
2126
|
+
*/
|
|
2127
|
+
type BatchWriteParams = {
|
|
2128
|
+
requests: Array<BatchRequest>;
|
|
2129
|
+
};
|
|
2130
|
+
|
|
2131
|
+
type BrowseParamsObject = SearchParamsObject & Cursor;
|
|
2132
|
+
|
|
2133
|
+
type BrowseParams = SearchParamsString | BrowseParamsObject;
|
|
2134
|
+
|
|
2135
|
+
type DeleteByParams = {
|
|
2136
|
+
facetFilters?: FacetFilters;
|
|
2036
2137
|
/**
|
|
2037
|
-
*
|
|
2138
|
+
* 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/).
|
|
2038
2139
|
*/
|
|
2039
|
-
|
|
2140
|
+
filters?: string;
|
|
2141
|
+
numericFilters?: NumericFilters;
|
|
2142
|
+
tagFilters?: TagFilters;
|
|
2040
2143
|
/**
|
|
2041
|
-
*
|
|
2144
|
+
* 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`.
|
|
2042
2145
|
*/
|
|
2043
|
-
|
|
2146
|
+
aroundLatLng?: string;
|
|
2147
|
+
aroundRadius?: AroundRadius;
|
|
2044
2148
|
/**
|
|
2045
|
-
* [
|
|
2149
|
+
* 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).
|
|
2046
2150
|
*/
|
|
2047
|
-
|
|
2151
|
+
insideBoundingBox?: Array<Array<number>>;
|
|
2048
2152
|
/**
|
|
2049
|
-
*
|
|
2153
|
+
* 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`.
|
|
2050
2154
|
*/
|
|
2051
|
-
|
|
2155
|
+
insidePolygon?: Array<Array<number>>;
|
|
2052
2156
|
};
|
|
2053
2157
|
|
|
2054
|
-
type
|
|
2158
|
+
type DictionaryType = 'plurals' | 'stopwords' | 'compounds';
|
|
2159
|
+
|
|
2160
|
+
type LogType = 'all' | 'query' | 'build' | 'error';
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Operation to perform on the index.
|
|
2164
|
+
*/
|
|
2165
|
+
type OperationType = 'move' | 'copy';
|
|
2166
|
+
|
|
2167
|
+
type ScopeType = 'settings' | 'synonyms' | 'rules';
|
|
2168
|
+
|
|
2169
|
+
type OperationIndexParams = {
|
|
2170
|
+
operation: OperationType;
|
|
2055
2171
|
/**
|
|
2056
|
-
*
|
|
2172
|
+
* Index name (case-sensitive).
|
|
2057
2173
|
*/
|
|
2058
|
-
|
|
2174
|
+
destination: string;
|
|
2059
2175
|
/**
|
|
2060
|
-
*
|
|
2176
|
+
* **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.
|
|
2061
2177
|
*/
|
|
2062
|
-
|
|
2178
|
+
scope?: Array<ScopeType>;
|
|
2063
2179
|
};
|
|
2064
2180
|
|
|
2065
2181
|
/**
|
|
2066
|
-
*
|
|
2182
|
+
* Search parameter.
|
|
2067
2183
|
*/
|
|
2068
|
-
type
|
|
2184
|
+
type SearchDictionaryEntriesParams = {
|
|
2069
2185
|
/**
|
|
2070
|
-
*
|
|
2186
|
+
* Search query.
|
|
2071
2187
|
*/
|
|
2072
2188
|
query: string;
|
|
2073
|
-
/**
|
|
2074
|
-
* Cluster name.
|
|
2075
|
-
*/
|
|
2076
|
-
clusterName?: string;
|
|
2077
2189
|
/**
|
|
2078
2190
|
* Page of search results to retrieve.
|
|
2079
2191
|
*/
|
|
@@ -2082,61 +2194,65 @@ type SearchUserIdsParams = {
|
|
|
2082
2194
|
* Number of hits per page.
|
|
2083
2195
|
*/
|
|
2084
2196
|
hitsPerPage?: number;
|
|
2197
|
+
language?: SupportedLanguage;
|
|
2085
2198
|
};
|
|
2086
2199
|
|
|
2087
|
-
type
|
|
2088
|
-
userID: HighlightResult;
|
|
2089
|
-
clusterName: HighlightResult;
|
|
2090
|
-
};
|
|
2091
|
-
|
|
2092
|
-
type UserHit = {
|
|
2093
|
-
/**
|
|
2094
|
-
* Unique identifier of the user who makes the search request.
|
|
2095
|
-
*/
|
|
2096
|
-
userID: string;
|
|
2097
|
-
/**
|
|
2098
|
-
* Cluster name.
|
|
2099
|
-
*/
|
|
2100
|
-
clusterName: string;
|
|
2200
|
+
type SearchForFacetValuesRequest = {
|
|
2101
2201
|
/**
|
|
2102
|
-
*
|
|
2202
|
+
* Search parameters as a URL-encoded query string.
|
|
2103
2203
|
*/
|
|
2104
|
-
|
|
2204
|
+
params?: string;
|
|
2105
2205
|
/**
|
|
2106
|
-
*
|
|
2206
|
+
* Text to search inside the facet\'s values.
|
|
2107
2207
|
*/
|
|
2108
|
-
|
|
2208
|
+
facetQuery?: string;
|
|
2109
2209
|
/**
|
|
2110
|
-
*
|
|
2210
|
+
* 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).
|
|
2111
2211
|
*/
|
|
2112
|
-
|
|
2113
|
-
_highlightResult: UserHighlightResult;
|
|
2212
|
+
maxFacetHits?: number;
|
|
2114
2213
|
};
|
|
2115
2214
|
|
|
2116
2215
|
/**
|
|
2117
|
-
*
|
|
2216
|
+
* Rules search parameters.
|
|
2118
2217
|
*/
|
|
2119
|
-
type
|
|
2218
|
+
type SearchRulesParams = {
|
|
2120
2219
|
/**
|
|
2121
|
-
*
|
|
2220
|
+
* Search query for rules.
|
|
2122
2221
|
*/
|
|
2123
|
-
|
|
2222
|
+
query?: string;
|
|
2223
|
+
anchoring?: Anchoring;
|
|
2124
2224
|
/**
|
|
2125
|
-
*
|
|
2225
|
+
* Only return rules that match the context (exact match).
|
|
2126
2226
|
*/
|
|
2127
|
-
|
|
2227
|
+
context?: string;
|
|
2128
2228
|
/**
|
|
2129
|
-
*
|
|
2229
|
+
* Requested page of the API response.
|
|
2130
2230
|
*/
|
|
2131
|
-
page
|
|
2231
|
+
page?: number;
|
|
2132
2232
|
/**
|
|
2133
2233
|
* Maximum number of hits per page.
|
|
2134
2234
|
*/
|
|
2135
|
-
hitsPerPage
|
|
2235
|
+
hitsPerPage?: number;
|
|
2136
2236
|
/**
|
|
2137
|
-
*
|
|
2237
|
+
* If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned.
|
|
2138
2238
|
*/
|
|
2139
|
-
|
|
2239
|
+
enabled?: boolean | null;
|
|
2240
|
+
};
|
|
2241
|
+
|
|
2242
|
+
type SearchSynonymsParams = {
|
|
2243
|
+
/**
|
|
2244
|
+
* Search query.
|
|
2245
|
+
*/
|
|
2246
|
+
query?: string;
|
|
2247
|
+
type?: SynonymType;
|
|
2248
|
+
/**
|
|
2249
|
+
* Page of search results to retrieve.
|
|
2250
|
+
*/
|
|
2251
|
+
page?: number;
|
|
2252
|
+
/**
|
|
2253
|
+
* Number of hits per page.
|
|
2254
|
+
*/
|
|
2255
|
+
hitsPerPage?: number;
|
|
2140
2256
|
};
|
|
2141
2257
|
|
|
2142
2258
|
type SecuredApiKeyRestrictions = {
|
|
@@ -2152,7 +2268,7 @@ type SecuredApiKeyRestrictions = {
|
|
|
2152
2268
|
/**
|
|
2153
2269
|
* Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
|
|
2154
2270
|
*/
|
|
2155
|
-
restrictIndices?: string
|
|
2271
|
+
restrictIndices?: Array<string>;
|
|
2156
2272
|
/**
|
|
2157
2273
|
* IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse.
|
|
2158
2274
|
*/
|
|
@@ -2163,73 +2279,6 @@ type SecuredApiKeyRestrictions = {
|
|
|
2163
2279
|
userToken?: string;
|
|
2164
2280
|
};
|
|
2165
2281
|
|
|
2166
|
-
type WithPrimary = {
|
|
2167
|
-
/**
|
|
2168
|
-
* Replica indices only: the name of the primary index for this replica.
|
|
2169
|
-
*/
|
|
2170
|
-
primary?: string;
|
|
2171
|
-
};
|
|
2172
|
-
|
|
2173
|
-
type SettingsResponse = IndexSettings & WithPrimary;
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
* Source.
|
|
2177
|
-
*/
|
|
2178
|
-
type Source = {
|
|
2179
|
-
/**
|
|
2180
|
-
* IP address range of the source.
|
|
2181
|
-
*/
|
|
2182
|
-
source: string;
|
|
2183
|
-
/**
|
|
2184
|
-
* Source description.
|
|
2185
|
-
*/
|
|
2186
|
-
description?: string;
|
|
2187
|
-
};
|
|
2188
|
-
|
|
2189
|
-
type UpdateApiKeyResponse = {
|
|
2190
|
-
/**
|
|
2191
|
-
* API key.
|
|
2192
|
-
*/
|
|
2193
|
-
key: string;
|
|
2194
|
-
/**
|
|
2195
|
-
* Date and time when the object was updated, in RFC 3339 format.
|
|
2196
|
-
*/
|
|
2197
|
-
updatedAt: string;
|
|
2198
|
-
};
|
|
2199
|
-
|
|
2200
|
-
/**
|
|
2201
|
-
* Response, taskID, unique object identifier, and an update timestamp.
|
|
2202
|
-
*/
|
|
2203
|
-
type UpdatedAtWithObjectIdResponse = {
|
|
2204
|
-
/**
|
|
2205
|
-
* 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`.
|
|
2206
|
-
*/
|
|
2207
|
-
taskID?: number;
|
|
2208
|
-
/**
|
|
2209
|
-
* Date and time when the object was updated, in RFC 3339 format.
|
|
2210
|
-
*/
|
|
2211
|
-
updatedAt?: string;
|
|
2212
|
-
/**
|
|
2213
|
-
* Unique record identifier.
|
|
2214
|
-
*/
|
|
2215
|
-
objectID?: string;
|
|
2216
|
-
};
|
|
2217
|
-
|
|
2218
|
-
type UpdatedRuleResponse = {
|
|
2219
|
-
/**
|
|
2220
|
-
* Unique identifier of a rule object.
|
|
2221
|
-
*/
|
|
2222
|
-
objectID: string;
|
|
2223
|
-
/**
|
|
2224
|
-
* Date and time when the object was updated, in RFC 3339 format.
|
|
2225
|
-
*/
|
|
2226
|
-
updatedAt: string;
|
|
2227
|
-
/**
|
|
2228
|
-
* 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`.
|
|
2229
|
-
*/
|
|
2230
|
-
taskID: number;
|
|
2231
|
-
};
|
|
2232
|
-
|
|
2233
2282
|
/**
|
|
2234
2283
|
* Properties for the `addOrUpdateObject` method.
|
|
2235
2284
|
*/
|
|
@@ -2243,7 +2292,7 @@ type AddOrUpdateObjectProps = {
|
|
|
2243
2292
|
*/
|
|
2244
2293
|
objectID: string;
|
|
2245
2294
|
/**
|
|
2246
|
-
* The record
|
|
2295
|
+
* The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
2247
2296
|
*/
|
|
2248
2297
|
body: Record<string, unknown>;
|
|
2249
2298
|
};
|
|
@@ -2343,7 +2392,9 @@ type CustomDeleteProps = {
|
|
|
2343
2392
|
/**
|
|
2344
2393
|
* Query parameters to apply to the current query.
|
|
2345
2394
|
*/
|
|
2346
|
-
parameters?:
|
|
2395
|
+
parameters?: {
|
|
2396
|
+
[key: string]: any;
|
|
2397
|
+
};
|
|
2347
2398
|
};
|
|
2348
2399
|
/**
|
|
2349
2400
|
* Properties for the `customGet` method.
|
|
@@ -2356,7 +2407,9 @@ type CustomGetProps = {
|
|
|
2356
2407
|
/**
|
|
2357
2408
|
* Query parameters to apply to the current query.
|
|
2358
2409
|
*/
|
|
2359
|
-
parameters?:
|
|
2410
|
+
parameters?: {
|
|
2411
|
+
[key: string]: any;
|
|
2412
|
+
};
|
|
2360
2413
|
};
|
|
2361
2414
|
/**
|
|
2362
2415
|
* Properties for the `customPost` method.
|
|
@@ -2369,7 +2422,9 @@ type CustomPostProps = {
|
|
|
2369
2422
|
/**
|
|
2370
2423
|
* Query parameters to apply to the current query.
|
|
2371
2424
|
*/
|
|
2372
|
-
parameters?:
|
|
2425
|
+
parameters?: {
|
|
2426
|
+
[key: string]: any;
|
|
2427
|
+
};
|
|
2373
2428
|
/**
|
|
2374
2429
|
* Parameters to send with the custom request.
|
|
2375
2430
|
*/
|
|
@@ -2386,7 +2441,9 @@ type CustomPutProps = {
|
|
|
2386
2441
|
/**
|
|
2387
2442
|
* Query parameters to apply to the current query.
|
|
2388
2443
|
*/
|
|
2389
|
-
parameters?:
|
|
2444
|
+
parameters?: {
|
|
2445
|
+
[key: string]: any;
|
|
2446
|
+
};
|
|
2390
2447
|
/**
|
|
2391
2448
|
* Parameters to send with the custom request.
|
|
2392
2449
|
*/
|
|
@@ -2530,7 +2587,7 @@ type GetObjectProps = {
|
|
|
2530
2587
|
/**
|
|
2531
2588
|
* Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
|
|
2532
2589
|
*/
|
|
2533
|
-
attributesToRetrieve?: string
|
|
2590
|
+
attributesToRetrieve?: Array<string>;
|
|
2534
2591
|
};
|
|
2535
2592
|
/**
|
|
2536
2593
|
* Properties for the `getRule` method.
|
|
@@ -2671,7 +2728,7 @@ type ReplaceSourcesProps = {
|
|
|
2671
2728
|
/**
|
|
2672
2729
|
* Allowed sources.
|
|
2673
2730
|
*/
|
|
2674
|
-
source: Source
|
|
2731
|
+
source: Array<Source>;
|
|
2675
2732
|
};
|
|
2676
2733
|
/**
|
|
2677
2734
|
* Properties for the `restoreApiKey` method.
|
|
@@ -2691,7 +2748,7 @@ type SaveObjectProps = {
|
|
|
2691
2748
|
*/
|
|
2692
2749
|
indexName: string;
|
|
2693
2750
|
/**
|
|
2694
|
-
* The record
|
|
2751
|
+
* The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
2695
2752
|
*/
|
|
2696
2753
|
body: Record<string, unknown>;
|
|
2697
2754
|
};
|
|
@@ -2721,7 +2778,7 @@ type SaveRulesProps = {
|
|
|
2721
2778
|
* Name of the index on which to perform the operation.
|
|
2722
2779
|
*/
|
|
2723
2780
|
indexName: string;
|
|
2724
|
-
rules: Rule
|
|
2781
|
+
rules: Array<Rule>;
|
|
2725
2782
|
/**
|
|
2726
2783
|
* Whether changes are applied to replica indices.
|
|
2727
2784
|
*/
|
|
@@ -2757,7 +2814,7 @@ type SaveSynonymsProps = {
|
|
|
2757
2814
|
* Name of the index on which to perform the operation.
|
|
2758
2815
|
*/
|
|
2759
2816
|
indexName: string;
|
|
2760
|
-
synonymHit: SynonymHit
|
|
2817
|
+
synonymHit: Array<SynonymHit>;
|
|
2761
2818
|
/**
|
|
2762
2819
|
* Whether changes are applied to replica indices.
|
|
2763
2820
|
*/
|
|
@@ -2980,7 +3037,7 @@ type ReplaceAllObjectsOptions = {
|
|
|
2980
3037
|
batchSize?: number;
|
|
2981
3038
|
};
|
|
2982
3039
|
|
|
2983
|
-
declare const apiClientVersion = "5.
|
|
3040
|
+
declare const apiClientVersion = "5.8.0";
|
|
2984
3041
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
2985
3042
|
transporter: _algolia_client_common.Transporter;
|
|
2986
3043
|
/**
|
|
@@ -3095,7 +3152,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3095
3152
|
* @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3096
3153
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3097
3154
|
*/
|
|
3098
|
-
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<BatchResponse
|
|
3155
|
+
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<Array<BatchResponse>>;
|
|
3099
3156
|
/**
|
|
3100
3157
|
* Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
3101
3158
|
*
|
|
@@ -3160,14 +3217,13 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3160
3217
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3161
3218
|
*/
|
|
3162
3219
|
searchForFacets(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
|
|
3163
|
-
results: SearchForFacetValuesResponse
|
|
3220
|
+
results: Array<SearchForFacetValuesResponse>;
|
|
3164
3221
|
}>;
|
|
3165
3222
|
/**
|
|
3166
3223
|
* Creates a new API key with specific permissions and restrictions.
|
|
3167
3224
|
*
|
|
3168
3225
|
* Required API Key ACLs:
|
|
3169
|
-
*
|
|
3170
|
-
*
|
|
3226
|
+
* - admin
|
|
3171
3227
|
* @param apiKey - The apiKey object.
|
|
3172
3228
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3173
3229
|
*/
|
|
@@ -3176,12 +3232,11 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3176
3232
|
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
3177
3233
|
*
|
|
3178
3234
|
* Required API Key ACLs:
|
|
3179
|
-
*
|
|
3180
|
-
*
|
|
3235
|
+
* - addObject
|
|
3181
3236
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
3182
3237
|
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
3183
3238
|
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
3184
|
-
* @param addOrUpdateObject.body - The record
|
|
3239
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3185
3240
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3186
3241
|
*/
|
|
3187
3242
|
addOrUpdateObject({ indexName, objectID, body }: AddOrUpdateObjectProps, requestOptions?: RequestOptions): Promise<UpdatedAtWithObjectIdResponse>;
|
|
@@ -3189,8 +3244,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3189
3244
|
* Adds a source to the list of allowed sources.
|
|
3190
3245
|
*
|
|
3191
3246
|
* Required API Key ACLs:
|
|
3192
|
-
*
|
|
3193
|
-
*
|
|
3247
|
+
* - admin
|
|
3194
3248
|
* @param source - Source to add.
|
|
3195
3249
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3196
3250
|
*/
|
|
@@ -3199,8 +3253,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3199
3253
|
* Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
|
3200
3254
|
*
|
|
3201
3255
|
* Required API Key ACLs:
|
|
3202
|
-
*
|
|
3203
|
-
*
|
|
3256
|
+
* - admin
|
|
3204
3257
|
* @param assignUserId - The assignUserId object.
|
|
3205
3258
|
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
3206
3259
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
@@ -3209,7 +3262,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3209
3262
|
assignUserId({ xAlgoliaUserID, assignUserIdParams }: AssignUserIdProps, requestOptions?: RequestOptions): Promise<CreatedAtResponse>;
|
|
3210
3263
|
/**
|
|
3211
3264
|
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
|
|
3212
|
-
*
|
|
3213
3265
|
* @param batch - The batch object.
|
|
3214
3266
|
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
3215
3267
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
@@ -3220,8 +3272,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3220
3272
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
3221
3273
|
*
|
|
3222
3274
|
* Required API Key ACLs:
|
|
3223
|
-
*
|
|
3224
|
-
*
|
|
3275
|
+
* - admin
|
|
3225
3276
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
3226
3277
|
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
3227
3278
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
@@ -3232,8 +3283,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3232
3283
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
3233
3284
|
*
|
|
3234
3285
|
* Required API Key ACLs:
|
|
3235
|
-
*
|
|
3236
|
-
*
|
|
3286
|
+
* - editSettings
|
|
3237
3287
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
3238
3288
|
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3239
3289
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
@@ -3241,11 +3291,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3241
3291
|
*/
|
|
3242
3292
|
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }: BatchDictionaryEntriesProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3243
3293
|
/**
|
|
3244
|
-
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict`
|
|
3294
|
+
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
|
|
3245
3295
|
*
|
|
3246
3296
|
* Required API Key ACLs:
|
|
3247
|
-
*
|
|
3248
|
-
*
|
|
3297
|
+
* - browse
|
|
3249
3298
|
* @param browse - The browse object.
|
|
3250
3299
|
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
3251
3300
|
* @param browse.browseParams - The browseParams object.
|
|
@@ -3256,8 +3305,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3256
3305
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
3257
3306
|
*
|
|
3258
3307
|
* Required API Key ACLs:
|
|
3259
|
-
*
|
|
3260
|
-
*
|
|
3308
|
+
* - deleteIndex
|
|
3261
3309
|
* @param clearObjects - The clearObjects object.
|
|
3262
3310
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
3263
3311
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3267,8 +3315,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3267
3315
|
* Deletes all rules from the index.
|
|
3268
3316
|
*
|
|
3269
3317
|
* Required API Key ACLs:
|
|
3270
|
-
*
|
|
3271
|
-
*
|
|
3318
|
+
* - editSettings
|
|
3272
3319
|
* @param clearRules - The clearRules object.
|
|
3273
3320
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
3274
3321
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -3279,8 +3326,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3279
3326
|
* Deletes all synonyms from the index.
|
|
3280
3327
|
*
|
|
3281
3328
|
* Required API Key ACLs:
|
|
3282
|
-
*
|
|
3283
|
-
*
|
|
3329
|
+
* - editSettings
|
|
3284
3330
|
* @param clearSynonyms - The clearSynonyms object.
|
|
3285
3331
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3286
3332
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -3289,7 +3335,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3289
3335
|
clearSynonyms({ indexName, forwardToReplicas }: ClearSynonymsProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3290
3336
|
/**
|
|
3291
3337
|
* This method allow you to send requests to the Algolia REST API.
|
|
3292
|
-
*
|
|
3293
3338
|
* @param customDelete - The customDelete object.
|
|
3294
3339
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3295
3340
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -3298,7 +3343,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3298
3343
|
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
3299
3344
|
/**
|
|
3300
3345
|
* This method allow you to send requests to the Algolia REST API.
|
|
3301
|
-
*
|
|
3302
3346
|
* @param customGet - The customGet object.
|
|
3303
3347
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3304
3348
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -3307,7 +3351,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3307
3351
|
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
3308
3352
|
/**
|
|
3309
3353
|
* This method allow you to send requests to the Algolia REST API.
|
|
3310
|
-
*
|
|
3311
3354
|
* @param customPost - The customPost object.
|
|
3312
3355
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3313
3356
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -3317,7 +3360,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3317
3360
|
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
3318
3361
|
/**
|
|
3319
3362
|
* This method allow you to send requests to the Algolia REST API.
|
|
3320
|
-
*
|
|
3321
3363
|
* @param customPut - The customPut object.
|
|
3322
3364
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3323
3365
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -3329,8 +3371,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3329
3371
|
* Deletes the API key.
|
|
3330
3372
|
*
|
|
3331
3373
|
* Required API Key ACLs:
|
|
3332
|
-
*
|
|
3333
|
-
*
|
|
3374
|
+
* - admin
|
|
3334
3375
|
* @param deleteApiKey - The deleteApiKey object.
|
|
3335
3376
|
* @param deleteApiKey.key - API key.
|
|
3336
3377
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3340,8 +3381,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3340
3381
|
* This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](#tag/Records/operation/batch).
|
|
3341
3382
|
*
|
|
3342
3383
|
* Required API Key ACLs:
|
|
3343
|
-
*
|
|
3344
|
-
*
|
|
3384
|
+
* - deleteIndex
|
|
3345
3385
|
* @param deleteBy - The deleteBy object.
|
|
3346
3386
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
3347
3387
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -3352,8 +3392,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3352
3392
|
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
|
|
3353
3393
|
*
|
|
3354
3394
|
* Required API Key ACLs:
|
|
3355
|
-
*
|
|
3356
|
-
*
|
|
3395
|
+
* - deleteIndex
|
|
3357
3396
|
* @param deleteIndex - The deleteIndex object.
|
|
3358
3397
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
3359
3398
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3363,8 +3402,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3363
3402
|
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
|
|
3364
3403
|
*
|
|
3365
3404
|
* Required API Key ACLs:
|
|
3366
|
-
*
|
|
3367
|
-
*
|
|
3405
|
+
* - deleteObject
|
|
3368
3406
|
* @param deleteObject - The deleteObject object.
|
|
3369
3407
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
3370
3408
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -3375,8 +3413,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3375
3413
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
3376
3414
|
*
|
|
3377
3415
|
* Required API Key ACLs:
|
|
3378
|
-
*
|
|
3379
|
-
*
|
|
3416
|
+
* - editSettings
|
|
3380
3417
|
* @param deleteRule - The deleteRule object.
|
|
3381
3418
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
3382
3419
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -3388,8 +3425,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3388
3425
|
* Deletes a source from the list of allowed sources.
|
|
3389
3426
|
*
|
|
3390
3427
|
* Required API Key ACLs:
|
|
3391
|
-
*
|
|
3392
|
-
*
|
|
3428
|
+
* - admin
|
|
3393
3429
|
* @param deleteSource - The deleteSource object.
|
|
3394
3430
|
* @param deleteSource.source - IP address range of the source.
|
|
3395
3431
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3399,8 +3435,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3399
3435
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
3400
3436
|
*
|
|
3401
3437
|
* Required API Key ACLs:
|
|
3402
|
-
*
|
|
3403
|
-
*
|
|
3438
|
+
* - editSettings
|
|
3404
3439
|
* @param deleteSynonym - The deleteSynonym object.
|
|
3405
3440
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
3406
3441
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -3409,8 +3444,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3409
3444
|
*/
|
|
3410
3445
|
deleteSynonym({ indexName, objectID, forwardToReplicas }: DeleteSynonymProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3411
3446
|
/**
|
|
3412
|
-
* Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key
|
|
3413
|
-
*
|
|
3447
|
+
* Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.
|
|
3414
3448
|
* @param getApiKey - The getApiKey object.
|
|
3415
3449
|
* @param getApiKey.key - API key.
|
|
3416
3450
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3420,8 +3454,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3420
3454
|
* Checks the status of a given application task.
|
|
3421
3455
|
*
|
|
3422
3456
|
* Required API Key ACLs:
|
|
3423
|
-
*
|
|
3424
|
-
*
|
|
3457
|
+
* - editSettings
|
|
3425
3458
|
* @param getAppTask - The getAppTask object.
|
|
3426
3459
|
* @param getAppTask.taskID - Unique task identifier.
|
|
3427
3460
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3431,17 +3464,17 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3431
3464
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
3432
3465
|
*
|
|
3433
3466
|
* Required API Key ACLs:
|
|
3434
|
-
*
|
|
3435
|
-
*
|
|
3467
|
+
* - settings
|
|
3436
3468
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3437
3469
|
*/
|
|
3438
|
-
getDictionaryLanguages(requestOptions?: RequestOptions): Promise<
|
|
3470
|
+
getDictionaryLanguages(requestOptions?: RequestOptions): Promise<{
|
|
3471
|
+
[key: string]: Languages;
|
|
3472
|
+
}>;
|
|
3439
3473
|
/**
|
|
3440
3474
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
3441
3475
|
*
|
|
3442
3476
|
* Required API Key ACLs:
|
|
3443
|
-
*
|
|
3444
|
-
*
|
|
3477
|
+
* - settings
|
|
3445
3478
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3446
3479
|
*/
|
|
3447
3480
|
getDictionarySettings(requestOptions?: RequestOptions): Promise<GetDictionarySettingsResponse>;
|
|
@@ -3449,8 +3482,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3449
3482
|
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
|
|
3450
3483
|
*
|
|
3451
3484
|
* Required API Key ACLs:
|
|
3452
|
-
*
|
|
3453
|
-
*
|
|
3485
|
+
* - logs
|
|
3454
3486
|
* @param getLogs - The getLogs object.
|
|
3455
3487
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
3456
3488
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -3463,8 +3495,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3463
3495
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
3464
3496
|
*
|
|
3465
3497
|
* Required API Key ACLs:
|
|
3466
|
-
*
|
|
3467
|
-
*
|
|
3498
|
+
* - search
|
|
3468
3499
|
* @param getObject - The getObject object.
|
|
3469
3500
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
3470
3501
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -3476,8 +3507,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3476
3507
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
3477
3508
|
*
|
|
3478
3509
|
* Required API Key ACLs:
|
|
3479
|
-
*
|
|
3480
|
-
*
|
|
3510
|
+
* - search
|
|
3481
3511
|
* @param getObjectsParams - Request object.
|
|
3482
3512
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3483
3513
|
*/
|
|
@@ -3486,8 +3516,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3486
3516
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
3487
3517
|
*
|
|
3488
3518
|
* Required API Key ACLs:
|
|
3489
|
-
*
|
|
3490
|
-
*
|
|
3519
|
+
* - settings
|
|
3491
3520
|
* @param getRule - The getRule object.
|
|
3492
3521
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
3493
3522
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -3498,8 +3527,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3498
3527
|
* Retrieves an object with non-null index settings.
|
|
3499
3528
|
*
|
|
3500
3529
|
* Required API Key ACLs:
|
|
3501
|
-
*
|
|
3502
|
-
*
|
|
3530
|
+
* - search
|
|
3503
3531
|
* @param getSettings - The getSettings object.
|
|
3504
3532
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
3505
3533
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3509,17 +3537,15 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3509
3537
|
* Retrieves all allowed IP addresses with access to your application.
|
|
3510
3538
|
*
|
|
3511
3539
|
* Required API Key ACLs:
|
|
3512
|
-
*
|
|
3513
|
-
*
|
|
3540
|
+
* - admin
|
|
3514
3541
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3515
3542
|
*/
|
|
3516
|
-
getSources(requestOptions?: RequestOptions): Promise<Source
|
|
3543
|
+
getSources(requestOptions?: RequestOptions): Promise<Array<Source>>;
|
|
3517
3544
|
/**
|
|
3518
|
-
* Retrieves a
|
|
3545
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
3519
3546
|
*
|
|
3520
3547
|
* Required API Key ACLs:
|
|
3521
|
-
*
|
|
3522
|
-
*
|
|
3548
|
+
* - settings
|
|
3523
3549
|
* @param getSynonym - The getSynonym object.
|
|
3524
3550
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
3525
3551
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -3530,8 +3556,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3530
3556
|
* Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
|
|
3531
3557
|
*
|
|
3532
3558
|
* Required API Key ACLs:
|
|
3533
|
-
*
|
|
3534
|
-
*
|
|
3559
|
+
* - addObject
|
|
3535
3560
|
* @param getTask - The getTask object.
|
|
3536
3561
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
3537
3562
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -3542,8 +3567,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3542
3567
|
* Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3543
3568
|
*
|
|
3544
3569
|
* Required API Key ACLs:
|
|
3545
|
-
*
|
|
3546
|
-
*
|
|
3570
|
+
* - admin
|
|
3547
3571
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3548
3572
|
*/
|
|
3549
3573
|
getTopUserIds(requestOptions?: RequestOptions): Promise<GetTopUserIdsResponse>;
|
|
@@ -3551,8 +3575,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3551
3575
|
* Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3552
3576
|
*
|
|
3553
3577
|
* Required API Key ACLs:
|
|
3554
|
-
*
|
|
3555
|
-
*
|
|
3578
|
+
* - admin
|
|
3556
3579
|
* @param getUserId - The getUserId object.
|
|
3557
3580
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
3558
3581
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3562,8 +3585,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3562
3585
|
* To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
|
3563
3586
|
*
|
|
3564
3587
|
* Required API Key ACLs:
|
|
3565
|
-
*
|
|
3566
|
-
*
|
|
3588
|
+
* - admin
|
|
3567
3589
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
3568
3590
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
3569
3591
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3573,8 +3595,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3573
3595
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
3574
3596
|
*
|
|
3575
3597
|
* Required API Key ACLs:
|
|
3576
|
-
*
|
|
3577
|
-
*
|
|
3598
|
+
* - admin
|
|
3578
3599
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3579
3600
|
*/
|
|
3580
3601
|
listApiKeys(requestOptions?: RequestOptions): Promise<ListApiKeysResponse>;
|
|
@@ -3582,8 +3603,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3582
3603
|
* Lists the available clusters in a multi-cluster setup.
|
|
3583
3604
|
*
|
|
3584
3605
|
* Required API Key ACLs:
|
|
3585
|
-
*
|
|
3586
|
-
*
|
|
3606
|
+
* - admin
|
|
3587
3607
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3588
3608
|
*/
|
|
3589
3609
|
listClusters(requestOptions?: RequestOptions): Promise<ListClustersResponse>;
|
|
@@ -3591,8 +3611,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3591
3611
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
3592
3612
|
*
|
|
3593
3613
|
* Required API Key ACLs:
|
|
3594
|
-
*
|
|
3595
|
-
*
|
|
3614
|
+
* - listIndexes
|
|
3596
3615
|
* @param listIndices - The listIndices object.
|
|
3597
3616
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3598
3617
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -3603,8 +3622,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3603
3622
|
* Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3604
3623
|
*
|
|
3605
3624
|
* Required API Key ACLs:
|
|
3606
|
-
*
|
|
3607
|
-
*
|
|
3625
|
+
* - admin
|
|
3608
3626
|
* @param listUserIds - The listUserIds object.
|
|
3609
3627
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3610
3628
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -3613,17 +3631,15 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3613
3631
|
listUserIds({ page, hitsPerPage }?: ListUserIdsProps, requestOptions?: RequestOptions | undefined): Promise<ListUserIdsResponse>;
|
|
3614
3632
|
/**
|
|
3615
3633
|
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
|
|
3616
|
-
*
|
|
3617
3634
|
* @param batchParams - The batchParams object.
|
|
3618
3635
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3619
3636
|
*/
|
|
3620
3637
|
multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise<MultipleBatchResponse>;
|
|
3621
3638
|
/**
|
|
3622
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data
|
|
3639
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
3623
3640
|
*
|
|
3624
3641
|
* Required API Key ACLs:
|
|
3625
|
-
*
|
|
3626
|
-
*
|
|
3642
|
+
* - addObject
|
|
3627
3643
|
* @param operationIndex - The operationIndex object.
|
|
3628
3644
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
3629
3645
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -3631,11 +3647,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3631
3647
|
*/
|
|
3632
3648
|
operationIndex({ indexName, operationIndexParams }: OperationIndexProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3633
3649
|
/**
|
|
3634
|
-
* Adds new attributes to a record, or
|
|
3650
|
+
* Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
|
|
3635
3651
|
*
|
|
3636
3652
|
* Required API Key ACLs:
|
|
3637
|
-
*
|
|
3638
|
-
*
|
|
3653
|
+
* - addObject
|
|
3639
3654
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
3640
3655
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
3641
3656
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -3648,8 +3663,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3648
3663
|
* Deletes a user ID and its associated data from the clusters.
|
|
3649
3664
|
*
|
|
3650
3665
|
* Required API Key ACLs:
|
|
3651
|
-
*
|
|
3652
|
-
*
|
|
3666
|
+
* - admin
|
|
3653
3667
|
* @param removeUserId - The removeUserId object.
|
|
3654
3668
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
3655
3669
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3659,8 +3673,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3659
3673
|
* Replaces the list of allowed sources.
|
|
3660
3674
|
*
|
|
3661
3675
|
* Required API Key ACLs:
|
|
3662
|
-
*
|
|
3663
|
-
*
|
|
3676
|
+
* - admin
|
|
3664
3677
|
* @param replaceSources - The replaceSources object.
|
|
3665
3678
|
* @param replaceSources.source - Allowed sources.
|
|
3666
3679
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3670,8 +3683,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3670
3683
|
* Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
|
|
3671
3684
|
*
|
|
3672
3685
|
* Required API Key ACLs:
|
|
3673
|
-
*
|
|
3674
|
-
*
|
|
3686
|
+
* - admin
|
|
3675
3687
|
* @param restoreApiKey - The restoreApiKey object.
|
|
3676
3688
|
* @param restoreApiKey.key - API key.
|
|
3677
3689
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3681,11 +3693,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3681
3693
|
* Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
3682
3694
|
*
|
|
3683
3695
|
* Required API Key ACLs:
|
|
3684
|
-
*
|
|
3685
|
-
*
|
|
3696
|
+
* - addObject
|
|
3686
3697
|
* @param saveObject - The saveObject object.
|
|
3687
3698
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3688
|
-
* @param saveObject.body - The record
|
|
3699
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3689
3700
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3690
3701
|
*/
|
|
3691
3702
|
saveObject({ indexName, body }: SaveObjectProps, requestOptions?: RequestOptions): Promise<SaveObjectResponse>;
|
|
@@ -3693,8 +3704,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3693
3704
|
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3694
3705
|
*
|
|
3695
3706
|
* Required API Key ACLs:
|
|
3696
|
-
*
|
|
3697
|
-
*
|
|
3707
|
+
* - editSettings
|
|
3698
3708
|
* @param saveRule - The saveRule object.
|
|
3699
3709
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3700
3710
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -3707,8 +3717,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3707
3717
|
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
|
|
3708
3718
|
*
|
|
3709
3719
|
* Required API Key ACLs:
|
|
3710
|
-
*
|
|
3711
|
-
*
|
|
3720
|
+
* - editSettings
|
|
3712
3721
|
* @param saveRules - The saveRules object.
|
|
3713
3722
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3714
3723
|
* @param saveRules.rules - The rules object.
|
|
@@ -3721,8 +3730,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3721
3730
|
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
|
|
3722
3731
|
*
|
|
3723
3732
|
* Required API Key ACLs:
|
|
3724
|
-
*
|
|
3725
|
-
*
|
|
3733
|
+
* - editSettings
|
|
3726
3734
|
* @param saveSynonym - The saveSynonym object.
|
|
3727
3735
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3728
3736
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -3735,8 +3743,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3735
3743
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
3736
3744
|
*
|
|
3737
3745
|
* Required API Key ACLs:
|
|
3738
|
-
*
|
|
3739
|
-
*
|
|
3746
|
+
* - editSettings
|
|
3740
3747
|
* @param saveSynonyms - The saveSynonyms object.
|
|
3741
3748
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3742
3749
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -3746,21 +3753,19 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3746
3753
|
*/
|
|
3747
3754
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }: SaveSynonymsProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
3748
3755
|
/**
|
|
3749
|
-
* Sends multiple search
|
|
3756
|
+
* Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
|
|
3750
3757
|
*
|
|
3751
3758
|
* Required API Key ACLs:
|
|
3752
|
-
*
|
|
3753
|
-
*
|
|
3759
|
+
* - search
|
|
3754
3760
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
3755
3761
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3756
3762
|
*/
|
|
3757
|
-
search<T>(searchMethodParams:
|
|
3763
|
+
search<T>(searchMethodParams: SearchMethodParams | LegacySearchMethodProps, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
|
|
3758
3764
|
/**
|
|
3759
3765
|
* Searches for standard and custom dictionary entries.
|
|
3760
3766
|
*
|
|
3761
3767
|
* Required API Key ACLs:
|
|
3762
|
-
*
|
|
3763
|
-
*
|
|
3768
|
+
* - settings
|
|
3764
3769
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3765
3770
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3766
3771
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -3771,8 +3776,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3771
3776
|
* Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
3772
3777
|
*
|
|
3773
3778
|
* Required API Key ACLs:
|
|
3774
|
-
*
|
|
3775
|
-
*
|
|
3779
|
+
* - search
|
|
3776
3780
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3777
3781
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3778
3782
|
* @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
@@ -3784,8 +3788,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3784
3788
|
* Searches for rules in your index.
|
|
3785
3789
|
*
|
|
3786
3790
|
* Required API Key ACLs:
|
|
3787
|
-
*
|
|
3788
|
-
*
|
|
3791
|
+
* - settings
|
|
3789
3792
|
* @param searchRules - The searchRules object.
|
|
3790
3793
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3791
3794
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -3793,11 +3796,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3793
3796
|
*/
|
|
3794
3797
|
searchRules({ indexName, searchRulesParams }: SearchRulesProps, requestOptions?: RequestOptions): Promise<SearchRulesResponse>;
|
|
3795
3798
|
/**
|
|
3796
|
-
* Searches a single index and
|
|
3799
|
+
* Searches a single index and returns matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
|
|
3797
3800
|
*
|
|
3798
3801
|
* Required API Key ACLs:
|
|
3799
|
-
*
|
|
3800
|
-
*
|
|
3802
|
+
* - search
|
|
3801
3803
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3802
3804
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3803
3805
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -3808,8 +3810,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3808
3810
|
* Searches for synonyms in your index.
|
|
3809
3811
|
*
|
|
3810
3812
|
* Required API Key ACLs:
|
|
3811
|
-
*
|
|
3812
|
-
*
|
|
3813
|
+
* - settings
|
|
3813
3814
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3814
3815
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3815
3816
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -3820,8 +3821,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3820
3821
|
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
3821
3822
|
*
|
|
3822
3823
|
* Required API Key ACLs:
|
|
3823
|
-
*
|
|
3824
|
-
*
|
|
3824
|
+
* - admin
|
|
3825
3825
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3826
3826
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3827
3827
|
*/
|
|
@@ -3830,8 +3830,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3830
3830
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3831
3831
|
*
|
|
3832
3832
|
* Required API Key ACLs:
|
|
3833
|
-
*
|
|
3834
|
-
*
|
|
3833
|
+
* - editSettings
|
|
3835
3834
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3836
3835
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3837
3836
|
*/
|
|
@@ -3840,8 +3839,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3840
3839
|
* Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
|
|
3841
3840
|
*
|
|
3842
3841
|
* Required API Key ACLs:
|
|
3843
|
-
*
|
|
3844
|
-
*
|
|
3842
|
+
* - editSettings
|
|
3845
3843
|
* @param setSettings - The setSettings object.
|
|
3846
3844
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3847
3845
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -3853,8 +3851,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3853
3851
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3854
3852
|
*
|
|
3855
3853
|
* Required API Key ACLs:
|
|
3856
|
-
*
|
|
3857
|
-
*
|
|
3854
|
+
* - admin
|
|
3858
3855
|
* @param updateApiKey - The updateApiKey object.
|
|
3859
3856
|
* @param updateApiKey.key - API key.
|
|
3860
3857
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -3863,8 +3860,32 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3863
3860
|
updateApiKey({ key, apiKey }: UpdateApiKeyProps, requestOptions?: RequestOptions): Promise<UpdateApiKeyResponse>;
|
|
3864
3861
|
};
|
|
3865
3862
|
|
|
3863
|
+
/**
|
|
3864
|
+
* How to change the attribute.
|
|
3865
|
+
*/
|
|
3866
|
+
type BuiltInOperationType = 'Increment' | 'Decrement' | 'Add' | 'Remove' | 'AddUnique' | 'IncrementFrom' | 'IncrementSet';
|
|
3867
|
+
|
|
3868
|
+
type BuiltInOperationValue = string | number;
|
|
3869
|
+
|
|
3870
|
+
/**
|
|
3871
|
+
* Update to perform on the attribute.
|
|
3872
|
+
*/
|
|
3873
|
+
type BuiltInOperation = {
|
|
3874
|
+
_operation: BuiltInOperationType;
|
|
3875
|
+
value: BuiltInOperationValue;
|
|
3876
|
+
};
|
|
3877
|
+
|
|
3878
|
+
type AttributeToUpdate = string | BuiltInOperation;
|
|
3879
|
+
|
|
3880
|
+
/**
|
|
3881
|
+
* Error.
|
|
3882
|
+
*/
|
|
3883
|
+
type ErrorBase = Record<string, any> & {
|
|
3884
|
+
message?: string;
|
|
3885
|
+
};
|
|
3886
|
+
|
|
3866
3887
|
type SearchClient = ReturnType<typeof createSearchClient> & SearchClientNodeHelpers;
|
|
3867
3888
|
|
|
3868
3889
|
declare function searchClient(appId: string, apiKey: string, options?: ClientOptions): SearchClient;
|
|
3869
3890
|
|
|
3870
|
-
export { type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UpdatedRuleResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WithPrimary, apiClientVersion, searchClient };
|
|
3891
|
+
export { type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type Banners, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UpdatedRuleResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|