@algolia/recommend 5.0.0-alpha.99 → 5.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/dist/builds/browser.d.ts +21 -3
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +21 -3
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/model/aroundPrecision.d.ts +1 -1
  6. package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
  7. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  8. package/dist/model/aroundRadius.d.ts +1 -1
  9. package/dist/model/aroundRadiusAll.d.ts +3 -0
  10. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  11. package/dist/model/autoFacetFilter.d.ts +14 -0
  12. package/dist/model/autoFacetFilter.d.ts.map +1 -0
  13. package/dist/model/baseRecommendRequest.d.ts +6 -4
  14. package/dist/model/baseRecommendRequest.d.ts.map +1 -1
  15. package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  16. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  17. package/dist/model/baseSearchResponse.d.ts +10 -6
  18. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  19. package/dist/model/boughtTogetherQuery.d.ts +4 -0
  20. package/dist/model/boughtTogetherQuery.d.ts.map +1 -0
  21. package/dist/model/clientMethodProps.d.ts +11 -11
  22. package/dist/model/condition.d.ts +6 -9
  23. package/dist/model/condition.d.ts.map +1 -1
  24. package/dist/model/consequence.d.ts +9 -17
  25. package/dist/model/consequence.d.ts.map +1 -1
  26. package/dist/model/deletedAtResponse.d.ts +2 -2
  27. package/dist/model/distinct.d.ts +1 -1
  28. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  29. package/dist/model/facetFilters.d.ts +1 -1
  30. package/dist/model/facetOrdering.d.ts +2 -2
  31. package/dist/model/facets.d.ts +2 -2
  32. package/dist/model/fallbackParams.d.ts +3 -0
  33. package/dist/model/fallbackParams.d.ts.map +1 -0
  34. package/dist/model/fbtModel.d.ts +5 -0
  35. package/dist/model/fbtModel.d.ts.map +1 -0
  36. package/dist/model/frequentlyBoughtTogether.d.ts +9 -0
  37. package/dist/model/frequentlyBoughtTogether.d.ts.map +1 -0
  38. package/dist/model/getRecommendationsParams.d.ts +2 -2
  39. package/dist/model/hideConsequenceObject.d.ts +10 -0
  40. package/dist/model/hideConsequenceObject.d.ts.map +1 -0
  41. package/dist/model/highlightResult.d.ts +1 -1
  42. package/dist/model/highlightResult.d.ts.map +1 -1
  43. package/dist/model/highlightResultOption.d.ts +3 -3
  44. package/dist/model/ignorePlurals.d.ts +3 -2
  45. package/dist/model/ignorePlurals.d.ts.map +1 -1
  46. package/dist/model/index.d.ts +21 -23
  47. package/dist/model/index.d.ts.map +1 -1
  48. package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
  49. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  50. package/dist/model/lookingSimilar.d.ts +11 -0
  51. package/dist/model/lookingSimilar.d.ts.map +1 -0
  52. package/dist/model/lookingSimilarModel.d.ts +5 -0
  53. package/dist/model/lookingSimilarModel.d.ts.map +1 -0
  54. package/dist/model/lookingSimilarQuery.d.ts +4 -0
  55. package/dist/model/lookingSimilarQuery.d.ts.map +1 -0
  56. package/dist/model/matchLevel.d.ts +1 -1
  57. package/dist/model/mode.d.ts +1 -1
  58. package/dist/model/numericFilters.d.ts +1 -1
  59. package/dist/model/optionalFilters.d.ts +1 -1
  60. package/dist/model/paramsConsequence.d.ts +19 -0
  61. package/dist/model/paramsConsequence.d.ts.map +1 -0
  62. package/dist/model/promoteConsequenceObject.d.ts +14 -0
  63. package/dist/model/promoteConsequenceObject.d.ts.map +1 -0
  64. package/dist/model/queryType.d.ts +1 -1
  65. package/dist/model/rankingInfo.d.ts +10 -7
  66. package/dist/model/rankingInfo.d.ts.map +1 -1
  67. package/dist/model/reRankingApplyFilter.d.ts +1 -1
  68. package/dist/model/recommendHit.d.ts +3 -3
  69. package/dist/model/recommendRule.d.ts +24 -0
  70. package/dist/model/recommendRule.d.ts.map +1 -0
  71. package/dist/model/recommendRuleMetadata.d.ts +10 -0
  72. package/dist/model/recommendRuleMetadata.d.ts.map +1 -0
  73. package/dist/model/recommendationsHits.d.ts +0 -8
  74. package/dist/model/recommendationsHits.d.ts.map +1 -1
  75. package/dist/model/recommendationsRequest.d.ts +4 -2
  76. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  77. package/dist/model/recommendedForYou.d.ts +7 -0
  78. package/dist/model/recommendedForYou.d.ts.map +1 -0
  79. package/dist/model/recommendedForYouModel.d.ts +1 -1
  80. package/dist/model/recommendedForYouQuery.d.ts +2 -2
  81. package/dist/model/recommendedForYouQuery.d.ts.map +1 -1
  82. package/dist/model/relatedModel.d.ts +5 -0
  83. package/dist/model/relatedModel.d.ts.map +1 -0
  84. package/dist/model/relatedProducts.d.ts +11 -0
  85. package/dist/model/relatedProducts.d.ts.map +1 -0
  86. package/dist/model/relatedQuery.d.ts +4 -0
  87. package/dist/model/relatedQuery.d.ts.map +1 -0
  88. package/dist/model/removeStopWords.d.ts +3 -2
  89. package/dist/model/removeStopWords.d.ts.map +1 -1
  90. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  91. package/dist/model/renderingContent.d.ts +1 -1
  92. package/dist/model/searchParams.d.ts +3 -0
  93. package/dist/model/searchParams.d.ts.map +1 -0
  94. package/dist/model/searchParamsObject.d.ts +3 -0
  95. package/dist/model/searchParamsObject.d.ts.map +1 -1
  96. package/dist/model/searchParamsQuery.d.ts +1 -1
  97. package/dist/model/searchRecommendRulesParams.d.ts +18 -6
  98. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -1
  99. package/dist/model/searchRecommendRulesResponse.d.ts +6 -6
  100. package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -1
  101. package/dist/model/semanticSearch.d.ts +2 -2
  102. package/dist/model/snippetResult.d.ts +1 -1
  103. package/dist/model/snippetResult.d.ts.map +1 -1
  104. package/dist/model/snippetResultOption.d.ts +2 -2
  105. package/dist/model/sortRemainingBy.d.ts +1 -1
  106. package/dist/model/supportedLanguage.d.ts +5 -0
  107. package/dist/model/supportedLanguage.d.ts.map +1 -0
  108. package/dist/model/tagFilters.d.ts +1 -1
  109. package/dist/model/taskStatus.d.ts +1 -1
  110. package/dist/model/trendingFacetHit.d.ts +2 -2
  111. package/dist/model/trendingFacets.d.ts +11 -0
  112. package/dist/model/trendingFacets.d.ts.map +1 -0
  113. package/dist/model/trendingFacetsModel.d.ts +1 -1
  114. package/dist/model/trendingFacetsQuery.d.ts +2 -2
  115. package/dist/model/trendingFacetsQuery.d.ts.map +1 -1
  116. package/dist/model/trendingItems.d.ts +15 -0
  117. package/dist/model/trendingItems.d.ts.map +1 -0
  118. package/dist/model/trendingItemsModel.d.ts +1 -1
  119. package/dist/model/trendingItemsQuery.d.ts +2 -2
  120. package/dist/model/trendingItemsQuery.d.ts.map +1 -1
  121. package/dist/model/typoTolerance.d.ts +1 -1
  122. package/dist/model/typoToleranceEnum.d.ts +3 -0
  123. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  124. package/dist/model/value.d.ts +1 -1
  125. package/dist/recommend.cjs +54 -45
  126. package/dist/recommend.esm.browser.js +42 -38
  127. package/dist/recommend.esm.node.js +54 -45
  128. package/dist/recommend.umd.js +2 -2
  129. package/dist/src/recommendClient.d.ts +34 -32
  130. package/dist/src/recommendClient.d.ts.map +1 -1
  131. package/model/aroundPrecision.ts +1 -1
  132. package/model/aroundPrecisionFromValueInner.ts +9 -0
  133. package/model/aroundRadius.ts +1 -1
  134. package/model/aroundRadiusAll.ts +3 -0
  135. package/model/autoFacetFilter.ts +16 -0
  136. package/model/baseRecommendRequest.ts +8 -4
  137. package/model/baseSearchParamsWithoutQuery.ts +26 -30
  138. package/model/baseSearchResponse.ts +11 -6
  139. package/model/{recommendationsQuery.ts → boughtTogetherQuery.ts} +3 -3
  140. package/model/clientMethodProps.ts +11 -11
  141. package/model/condition.ts +6 -12
  142. package/model/consequence.ts +9 -19
  143. package/model/deletedAtResponse.ts +2 -2
  144. package/model/distinct.ts +1 -1
  145. package/model/exactOnSingleWordQuery.ts +1 -1
  146. package/model/facetFilters.ts +1 -1
  147. package/model/facetOrdering.ts +2 -2
  148. package/model/facets.ts +2 -2
  149. package/model/{editType.ts → fallbackParams.ts} +3 -4
  150. package/model/fbtModel.ts +6 -0
  151. package/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +6 -5
  152. package/model/getRecommendationsParams.ts +2 -2
  153. package/model/hideConsequenceObject.ts +11 -0
  154. package/model/highlightResult.ts +1 -0
  155. package/model/highlightResultOption.ts +3 -3
  156. package/model/ignorePlurals.ts +4 -2
  157. package/model/index.ts +21 -23
  158. package/model/indexSettingsAsSearchParams.ts +32 -36
  159. package/model/lookingSimilar.ts +15 -0
  160. package/model/lookingSimilarModel.ts +6 -0
  161. package/model/lookingSimilarQuery.ts +6 -0
  162. package/model/matchLevel.ts +1 -1
  163. package/model/mode.ts +1 -1
  164. package/model/numericFilters.ts +1 -1
  165. package/model/optionalFilters.ts +1 -1
  166. package/model/paramsConsequence.ts +23 -0
  167. package/model/promoteConsequenceObject.ts +16 -0
  168. package/model/queryType.ts +1 -1
  169. package/model/rankingInfo.ts +10 -7
  170. package/model/reRankingApplyFilter.ts +1 -1
  171. package/model/recommendHit.ts +3 -3
  172. package/model/{ruleResponse.ts → recommendRule.ts} +7 -10
  173. package/model/{ruleResponseMetadata.ts → recommendRuleMetadata.ts} +5 -2
  174. package/model/recommendationsHits.ts +0 -10
  175. package/model/recommendationsRequest.ts +6 -2
  176. package/model/{baseRecommendedForYouQuery.ts → recommendedForYou.ts} +3 -5
  177. package/model/recommendedForYouModel.ts +1 -1
  178. package/model/recommendedForYouQuery.ts +2 -3
  179. package/model/relatedModel.ts +6 -0
  180. package/model/relatedProducts.ts +15 -0
  181. package/model/relatedQuery.ts +6 -0
  182. package/model/removeStopWords.ts +4 -2
  183. package/model/removeWordsIfNoResults.ts +1 -1
  184. package/model/renderingContent.ts +1 -1
  185. package/model/{recommendationModels.ts → searchParams.ts} +3 -4
  186. package/model/searchParamsObject.ts +3 -0
  187. package/model/searchParamsQuery.ts +1 -1
  188. package/model/searchRecommendRulesParams.ts +21 -6
  189. package/model/searchRecommendRulesResponse.ts +6 -6
  190. package/model/semanticSearch.ts +2 -2
  191. package/model/snippetResult.ts +2 -1
  192. package/model/snippetResultOption.ts +2 -2
  193. package/model/sortRemainingBy.ts +1 -1
  194. package/model/supportedLanguage.ts +74 -0
  195. package/model/tagFilters.ts +1 -1
  196. package/model/taskStatus.ts +1 -1
  197. package/model/trendingFacetHit.ts +2 -2
  198. package/model/{baseTrendingFacetsQuery.ts → trendingFacets.ts} +7 -4
  199. package/model/trendingFacetsModel.ts +1 -1
  200. package/model/trendingFacetsQuery.ts +2 -3
  201. package/model/trendingItems.ts +20 -0
  202. package/model/trendingItemsModel.ts +1 -1
  203. package/model/trendingItemsQuery.ts +2 -2
  204. package/model/typoTolerance.ts +1 -1
  205. package/model/typoToleranceEnum.ts +3 -0
  206. package/model/value.ts +1 -1
  207. package/package.json +7 -7
  208. package/dist/model/anchoring.d.ts +0 -5
  209. package/dist/model/anchoring.d.ts.map +0 -1
  210. package/dist/model/automaticFacetFilter.d.ts +0 -18
  211. package/dist/model/automaticFacetFilter.d.ts.map +0 -1
  212. package/dist/model/automaticFacetFilters.d.ts +0 -6
  213. package/dist/model/automaticFacetFilters.d.ts.map +0 -1
  214. package/dist/model/baseRecommendationsQuery.d.ts +0 -12
  215. package/dist/model/baseRecommendationsQuery.d.ts.map +0 -1
  216. package/dist/model/baseRecommendedForYouQuery.d.ts +0 -8
  217. package/dist/model/baseRecommendedForYouQuery.d.ts.map +0 -1
  218. package/dist/model/baseRecommendedForYouQueryParameters.d.ts +0 -7
  219. package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +0 -1
  220. package/dist/model/baseTrendingFacetsQuery.d.ts +0 -9
  221. package/dist/model/baseTrendingFacetsQuery.d.ts.map +0 -1
  222. package/dist/model/baseTrendingItemsQuery.d.ts +0 -16
  223. package/dist/model/baseTrendingItemsQuery.d.ts.map +0 -1
  224. package/dist/model/consequenceHide.d.ts +0 -10
  225. package/dist/model/consequenceHide.d.ts.map +0 -1
  226. package/dist/model/consequenceParams.d.ts +0 -5
  227. package/dist/model/consequenceParams.d.ts.map +0 -1
  228. package/dist/model/consequenceQuery.d.ts +0 -6
  229. package/dist/model/consequenceQuery.d.ts.map +0 -1
  230. package/dist/model/consequenceQueryObject.d.ts +0 -12
  231. package/dist/model/consequenceQueryObject.d.ts.map +0 -1
  232. package/dist/model/edit.d.ts +0 -13
  233. package/dist/model/edit.d.ts.map +0 -1
  234. package/dist/model/editType.d.ts +0 -5
  235. package/dist/model/editType.d.ts.map +0 -1
  236. package/dist/model/params.d.ts +0 -13
  237. package/dist/model/params.d.ts.map +0 -1
  238. package/dist/model/promote.d.ts +0 -4
  239. package/dist/model/promote.d.ts.map +0 -1
  240. package/dist/model/promoteObjectID.d.ts +0 -14
  241. package/dist/model/promoteObjectID.d.ts.map +0 -1
  242. package/dist/model/promoteObjectIDs.d.ts +0 -14
  243. package/dist/model/promoteObjectIDs.d.ts.map +0 -1
  244. package/dist/model/recommendationModels.d.ts +0 -5
  245. package/dist/model/recommendationModels.d.ts.map +0 -1
  246. package/dist/model/recommendationsQuery.d.ts +0 -4
  247. package/dist/model/recommendationsQuery.d.ts.map +0 -1
  248. package/dist/model/recommendedForYouQueryParameters.d.ts +0 -4
  249. package/dist/model/recommendedForYouQueryParameters.d.ts.map +0 -1
  250. package/dist/model/ruleResponse.d.ts +0 -27
  251. package/dist/model/ruleResponse.d.ts.map +0 -1
  252. package/dist/model/ruleResponseMetadata.d.ts +0 -7
  253. package/dist/model/ruleResponseMetadata.d.ts.map +0 -1
  254. package/model/anchoring.ts +0 -6
  255. package/model/automaticFacetFilter.ts +0 -21
  256. package/model/automaticFacetFilters.ts +0 -8
  257. package/model/baseRecommendationsQuery.ts +0 -17
  258. package/model/baseRecommendedForYouQueryParameters.ts +0 -8
  259. package/model/baseTrendingItemsQuery.ts +0 -22
  260. package/model/consequenceParams.ts +0 -9
  261. package/model/consequenceQuery.ts +0 -8
  262. package/model/consequenceQueryObject.ts +0 -15
  263. package/model/edit.ts +0 -17
  264. package/model/params.ts +0 -18
  265. package/model/promote.ts +0 -6
  266. package/model/promoteObjectID.ts +0 -16
  267. package/model/promoteObjectIDs.ts +0 -16
  268. package/model/recommendedForYouQueryParameters.ts +0 -7
package/model/index.ts CHANGED
@@ -2,32 +2,20 @@
2
2
 
3
3
  export * from './advancedSyntaxFeatures';
4
4
  export * from './alternativesAsExact';
5
- export * from './anchoring';
6
5
  export * from './aroundPrecision';
7
6
  export * from './aroundPrecisionFromValueInner';
8
7
  export * from './aroundRadius';
9
8
  export * from './aroundRadiusAll';
10
- export * from './automaticFacetFilter';
11
- export * from './automaticFacetFilters';
9
+ export * from './autoFacetFilter';
12
10
  export * from './baseRecommendRequest';
13
- export * from './baseRecommendationsQuery';
14
- export * from './baseRecommendedForYouQuery';
15
- export * from './baseRecommendedForYouQueryParameters';
16
11
  export * from './baseSearchParams';
17
12
  export * from './baseSearchParamsWithoutQuery';
18
13
  export * from './baseSearchResponse';
19
- export * from './baseTrendingFacetsQuery';
20
- export * from './baseTrendingItemsQuery';
14
+ export * from './boughtTogetherQuery';
21
15
  export * from './condition';
22
16
  export * from './consequence';
23
- export * from './consequenceHide';
24
- export * from './consequenceParams';
25
- export * from './consequenceQuery';
26
- export * from './consequenceQueryObject';
27
17
  export * from './deletedAtResponse';
28
18
  export * from './distinct';
29
- export * from './edit';
30
- export * from './editType';
31
19
  export * from './errorBase';
32
20
  export * from './exactOnSingleWordQuery';
33
21
  export * from './exhaustive';
@@ -35,46 +23,53 @@ export * from './facetFilters';
35
23
  export * from './facetOrdering';
36
24
  export * from './facets';
37
25
  export * from './facetsStats';
26
+ export * from './fallbackParams';
27
+ export * from './fbtModel';
28
+ export * from './frequentlyBoughtTogether';
38
29
  export * from './getRecommendTaskResponse';
39
30
  export * from './getRecommendationsParams';
40
31
  export * from './getRecommendationsResponse';
32
+ export * from './hideConsequenceObject';
41
33
  export * from './highlightResult';
42
34
  export * from './highlightResultOption';
43
35
  export * from './ignorePlurals';
44
36
  export * from './indexSettingsAsSearchParams';
37
+ export * from './lookingSimilar';
38
+ export * from './lookingSimilarModel';
39
+ export * from './lookingSimilarQuery';
45
40
  export * from './matchLevel';
46
41
  export * from './matchedGeoLocation';
47
42
  export * from './mixedSearchFilters';
48
43
  export * from './mode';
49
44
  export * from './numericFilters';
50
45
  export * from './optionalFilters';
51
- export * from './params';
46
+ export * from './paramsConsequence';
52
47
  export * from './personalization';
53
- export * from './promote';
54
- export * from './promoteObjectID';
55
- export * from './promoteObjectIDs';
48
+ export * from './promoteConsequenceObject';
56
49
  export * from './queryType';
57
50
  export * from './rankingInfo';
58
51
  export * from './reRankingApplyFilter';
59
52
  export * from './recommendHit';
60
53
  export * from './recommendModels';
61
- export * from './recommendationModels';
54
+ export * from './recommendRule';
55
+ export * from './recommendRuleMetadata';
62
56
  export * from './recommendationsHit';
63
57
  export * from './recommendationsHits';
64
- export * from './recommendationsQuery';
65
58
  export * from './recommendationsRequest';
66
59
  export * from './recommendationsResults';
60
+ export * from './recommendedForYou';
67
61
  export * from './recommendedForYouModel';
68
62
  export * from './recommendedForYouQuery';
69
- export * from './recommendedForYouQueryParameters';
70
63
  export * from './redirect';
71
64
  export * from './redirectRuleIndexMetadata';
72
65
  export * from './redirectRuleIndexMetadataData';
66
+ export * from './relatedModel';
67
+ export * from './relatedProducts';
68
+ export * from './relatedQuery';
73
69
  export * from './removeStopWords';
74
70
  export * from './removeWordsIfNoResults';
75
71
  export * from './renderingContent';
76
- export * from './ruleResponse';
77
- export * from './ruleResponseMetadata';
72
+ export * from './searchParams';
78
73
  export * from './searchParamsObject';
79
74
  export * from './searchParamsQuery';
80
75
  export * from './searchRecommendRulesParams';
@@ -83,11 +78,14 @@ export * from './semanticSearch';
83
78
  export * from './snippetResult';
84
79
  export * from './snippetResultOption';
85
80
  export * from './sortRemainingBy';
81
+ export * from './supportedLanguage';
86
82
  export * from './tagFilters';
87
83
  export * from './taskStatus';
88
84
  export * from './trendingFacetHit';
85
+ export * from './trendingFacets';
89
86
  export * from './trendingFacetsModel';
90
87
  export * from './trendingFacetsQuery';
88
+ export * from './trendingItems';
91
89
  export * from './trendingItemsModel';
92
90
  export * from './trendingItemsQuery';
93
91
  export * from './typoTolerance';
@@ -12,51 +12,47 @@ import type { RemoveStopWords } from './removeStopWords';
12
12
  import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
13
13
  import type { RenderingContent } from './renderingContent';
14
14
  import type { SemanticSearch } from './semanticSearch';
15
+ import type { SupportedLanguage } from './supportedLanguage';
15
16
  import type { TypoTolerance } from './typoTolerance';
16
17
 
17
18
  export type IndexSettingsAsSearchParams = {
18
19
  /**
19
- * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`.
20
- */
21
- attributesForFaceting?: string[];
22
-
23
- /**
24
- * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.
20
+ * 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.
25
21
  */
26
22
  attributesToRetrieve?: string[];
27
23
 
28
24
  /**
29
- * Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
25
+ * 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/).
30
26
  */
31
27
  ranking?: string[];
32
28
 
33
29
  /**
34
- * Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending.
30
+ * 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.
35
31
  */
36
32
  customRanking?: string[];
37
33
 
38
34
  /**
39
- * Relevancy threshold below which less relevant results aren\'t included in the results.
35
+ * Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
40
36
  */
41
37
  relevancyStrictness?: number;
42
38
 
43
39
  /**
44
- * Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).
40
+ * 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/).
45
41
  */
46
42
  attributesToHighlight?: string[];
47
43
 
48
44
  /**
49
- * Attributes to _snippet_. \'Snippeting\' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`.
45
+ * 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.
50
46
  */
51
47
  attributesToSnippet?: string[];
52
48
 
53
49
  /**
54
- * HTML string to insert before the highlighted parts in all highlight and snippet results.
50
+ * HTML tag to insert before the highlighted parts in all highlighted results and snippets.
55
51
  */
56
52
  highlightPreTag?: string;
57
53
 
58
54
  /**
59
- * HTML string to insert after the highlighted parts in all highlight and snippet results.
55
+ * HTML tag to insert after the highlighted parts in all highlighted results and snippets.
60
56
  */
61
57
  highlightPostTag?: string;
62
58
 
@@ -66,7 +62,7 @@ export type IndexSettingsAsSearchParams = {
66
62
  snippetEllipsisText?: string;
67
63
 
68
64
  /**
69
- * Restrict highlighting and snippeting to items that matched the query.
65
+ * Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
70
66
  */
71
67
  restrictHighlightAndSnippetArrays?: boolean;
72
68
 
@@ -76,24 +72,24 @@ export type IndexSettingsAsSearchParams = {
76
72
  hitsPerPage?: number;
77
73
 
78
74
  /**
79
- * Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
75
+ * Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
80
76
  */
81
77
  minWordSizefor1Typo?: number;
82
78
 
83
79
  /**
84
- * Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
80
+ * Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
85
81
  */
86
82
  minWordSizefor2Typos?: number;
87
83
 
88
84
  typoTolerance?: TypoTolerance;
89
85
 
90
86
  /**
91
- * Whether to allow typos on numbers (\"numeric tokens\") in the query string.
87
+ * Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers.
92
88
  */
93
89
  allowTyposOnNumericTokens?: boolean;
94
90
 
95
91
  /**
96
- * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
92
+ * 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.
97
93
  */
98
94
  disableTypoToleranceOnAttributes?: string[];
99
95
 
@@ -102,27 +98,27 @@ export type IndexSettingsAsSearchParams = {
102
98
  removeStopWords?: RemoveStopWords;
103
99
 
104
100
  /**
105
- * Characters that the engine shouldn\'t automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
101
+ * Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
106
102
  */
107
103
  keepDiacriticsOnCharacters?: string;
108
104
 
109
105
  /**
110
- * Sets your user\'s search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [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) word detection.
106
+ * 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/).
111
107
  */
112
- queryLanguages?: string[];
108
+ queryLanguages?: SupportedLanguage[];
113
109
 
114
110
  /**
115
- * [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query.
111
+ * Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
116
112
  */
117
113
  decompoundQuery?: boolean;
118
114
 
119
115
  /**
120
- * Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.
116
+ * Whether to enable rules.
121
117
  */
122
118
  enableRules?: boolean;
123
119
 
124
120
  /**
125
- * Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.
121
+ * Whether to enable Personalization.
126
122
  */
127
123
  enablePersonalization?: boolean;
128
124
 
@@ -135,51 +131,51 @@ export type IndexSettingsAsSearchParams = {
135
131
  semanticSearch?: SemanticSearch;
136
132
 
137
133
  /**
138
- * Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).
134
+ * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
139
135
  */
140
136
  advancedSyntax?: boolean;
141
137
 
142
138
  /**
143
- * Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.
139
+ * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
144
140
  */
145
141
  optionalWords?: string[];
146
142
 
147
143
  /**
148
- * 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).
144
+ * 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 likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
149
145
  */
150
146
  disableExactOnAttributes?: string[];
151
147
 
152
148
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
153
149
 
154
150
  /**
155
- * Alternatives that should be considered an exact match by [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).
151
+ * 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.
156
152
  */
157
153
  alternativesAsExact?: AlternativesAsExact[];
158
154
 
159
155
  /**
160
- * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.
156
+ * 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.
161
157
  */
162
158
  advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
163
159
 
164
160
  distinct?: Distinct;
165
161
 
166
162
  /**
167
- * Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
163
+ * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response.
168
164
  */
169
165
  replaceSynonymsInHighlight?: boolean;
170
166
 
171
167
  /**
172
- * Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).
168
+ * Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
173
169
  */
174
170
  minProximity?: number;
175
171
 
176
172
  /**
177
- * Attributes to include in the API response for search and browse queries.
173
+ * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI.
178
174
  */
179
175
  responseFields?: string[];
180
176
 
181
177
  /**
182
- * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
178
+ * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
183
179
  */
184
180
  maxFacetHits?: number;
185
181
 
@@ -189,19 +185,19 @@ export type IndexSettingsAsSearchParams = {
189
185
  maxValuesPerFacet?: number;
190
186
 
191
187
  /**
192
- * Controls how facet values are fetched.
188
+ * Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
193
189
  */
194
190
  sortFacetValuesBy?: string;
195
191
 
196
192
  /**
197
- * When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.
193
+ * Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.
198
194
  */
199
195
  attributeCriteriaComputedByMinProximity?: boolean;
200
196
 
201
197
  renderingContent?: RenderingContent;
202
198
 
203
199
  /**
204
- * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
200
+ * Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
205
201
  */
206
202
  enableReRanking?: boolean;
207
203
 
@@ -0,0 +1,15 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { FallbackParams } from './fallbackParams';
4
+ import type { LookingSimilarModel } from './lookingSimilarModel';
5
+
6
+ export type LookingSimilar = {
7
+ model: LookingSimilarModel;
8
+
9
+ /**
10
+ * Unique record identifier.
11
+ */
12
+ objectID: string;
13
+
14
+ fallbackParameters?: FallbackParams;
15
+ };
@@ -0,0 +1,6 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ /**
4
+ * Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index.
5
+ */
6
+ export type LookingSimilarModel = 'looking-similar';
@@ -0,0 +1,6 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
4
+ import type { LookingSimilar } from './lookingSimilar';
5
+
6
+ export type LookingSimilarQuery = BaseRecommendRequest & LookingSimilar;
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Indicates how well the attribute matched the search query.
4
+ * Whether the whole query string matches or only a part.
5
5
  */
6
6
  export type MatchLevel = 'full' | 'none' | 'partial';
package/model/mode.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Search mode the index will use to query for results.
4
+ * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
5
5
  */
6
6
  export type Mode = 'keywordSearch' | 'neuralSearch';
@@ -3,6 +3,6 @@
3
3
  import type { MixedSearchFilters } from './mixedSearchFilters';
4
4
 
5
5
  /**
6
- * [Filter on numeric attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/).
6
+ * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
7
7
  */
8
8
  export type NumericFilters = MixedSearchFilters[] | string;
@@ -3,6 +3,6 @@
3
3
  import type { MixedSearchFilters } from './mixedSearchFilters';
4
4
 
5
5
  /**
6
- * Create filters to boost or demote records. Records that match the filter are ranked higher for positive and lower for negative optional filters. In contrast to regular filters, records that don\'t match the optional filter are still included in the results, only their ranking is affected.
6
+ * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes.
7
7
  */
8
8
  export type OptionalFilters = MixedSearchFilters[] | string;
@@ -0,0 +1,23 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { AutoFacetFilter } from './autoFacetFilter';
4
+
5
+ /**
6
+ * Filter or boost recommendations matching a facet filter.
7
+ */
8
+ export type ParamsConsequence = {
9
+ /**
10
+ * Filter recommendations that match or don\'t match the same `facet:facet_value` combination as the viewed item.
11
+ */
12
+ automaticFacetFilters?: AutoFacetFilter[];
13
+
14
+ /**
15
+ * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
16
+ */
17
+ filters?: string;
18
+
19
+ /**
20
+ * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. Matches with higher weights (`<score=N>`) rank before matches with lower weights. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match.
21
+ */
22
+ optionalFilters?: string[];
23
+ };
@@ -0,0 +1,16 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ /**
4
+ * Object ID and position of the recommendation you want to pin.
5
+ */
6
+ export type PromoteConsequenceObject = {
7
+ /**
8
+ * Unique record identifier.
9
+ */
10
+ objectID?: string;
11
+
12
+ /**
13
+ * Index in the list of recommendations where to place this item.
14
+ */
15
+ position?: number;
16
+ };
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
4
+ * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
5
5
  */
6
6
  export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
@@ -3,14 +3,17 @@
3
3
  import type { MatchedGeoLocation } from './matchedGeoLocation';
4
4
  import type { Personalization } from './personalization';
5
5
 
6
+ /**
7
+ * Object with detailed information about the record\'s ranking.
8
+ */
6
9
  export type RankingInfo = {
7
10
  /**
8
- * This field is reserved for advanced usage.
11
+ * Whether a filter matched the query.
9
12
  */
10
13
  filters: number;
11
14
 
12
15
  /**
13
- * Position of the most important matched attribute in the attributes to index list.
16
+ * Position of the first matched word in the best matching attribute of the record.
14
17
  */
15
18
  firstMatchedWord: number;
16
19
 
@@ -39,27 +42,27 @@ export type RankingInfo = {
39
42
  nbTypos: number;
40
43
 
41
44
  /**
42
- * Present and set to true if a Rule promoted the hit.
45
+ * Whether the record was promoted by a rule.
43
46
  */
44
47
  promoted: boolean;
45
48
 
46
49
  /**
47
- * When the query contains more than one word, the sum of the distances between matched words (in meters).
50
+ * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
48
51
  */
49
52
  proximityDistance?: number;
50
53
 
51
54
  /**
52
- * Custom ranking for the object, expressed as a single integer value.
55
+ * Overall ranking of the record, expressed as a single integer. This attribute is internal.
53
56
  */
54
57
  userScore: number;
55
58
 
56
59
  /**
57
- * Number of matched words, including prefixes and typos.
60
+ * Number of matched words.
58
61
  */
59
62
  words: number;
60
63
 
61
64
  /**
62
- * Wether the record are promoted by the re-ranking strategy.
65
+ * Whether the record is re-ranked.
63
66
  */
64
67
  promotedByReRanking?: boolean;
65
68
  };
@@ -3,6 +3,6 @@
3
3
  import type { MixedSearchFilters } from './mixedSearchFilters';
4
4
 
5
5
  /**
6
- * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking.
6
+ * Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
7
7
  */
8
8
  export type ReRankingApplyFilter = MixedSearchFilters[] | string;
@@ -9,17 +9,17 @@ import type { SnippetResult } from './snippetResult';
9
9
  */
10
10
  export type RecommendHit = Record<string, any> & {
11
11
  /**
12
- * Unique object identifier.
12
+ * Unique record identifier.
13
13
  */
14
14
  objectID: string;
15
15
 
16
16
  /**
17
- * Show highlighted section and words matched on a query.
17
+ * Surround words that match the query with HTML tags for highlighting.
18
18
  */
19
19
  _highlightResult?: Record<string, HighlightResult>;
20
20
 
21
21
  /**
22
- * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
22
+ * Snippets that show the context around a matching search query.
23
23
  */
24
24
  _snippetResult?: Record<string, SnippetResult>;
25
25
 
@@ -2,23 +2,20 @@
2
2
 
3
3
  import type { Condition } from './condition';
4
4
  import type { Consequence } from './consequence';
5
- import type { RuleResponseMetadata } from './ruleResponseMetadata';
5
+ import type { RecommendRuleMetadata } from './recommendRuleMetadata';
6
6
 
7
7
  /**
8
- * Rule object.
8
+ * Recommend rule.
9
9
  */
10
- export type RuleResponse = {
11
- _metadata?: RuleResponseMetadata;
10
+ export type RecommendRule = {
11
+ _metadata?: RecommendRuleMetadata;
12
12
 
13
13
  /**
14
- * Unique identifier for a rule object.
14
+ * Unique identifier of a rule object.
15
15
  */
16
- objectID: string;
16
+ objectID?: string;
17
17
 
18
- /**
19
- * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) required to activate a rule. You can use up to 25 conditions per rule.
20
- */
21
- conditions?: Condition[];
18
+ condition?: Condition;
22
19
 
23
20
  consequence?: Consequence;
24
21
 
@@ -1,8 +1,11 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type RuleResponseMetadata = {
3
+ /**
4
+ * Rule metadata.
5
+ */
6
+ export type RecommendRuleMetadata = {
4
7
  /**
5
- * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
8
+ * Date and time when the object was updated, in RFC 3339 format.
6
9
  */
7
10
  lastUpdate?: string;
8
11
  };
@@ -4,14 +4,4 @@ import type { RecommendationsHit } from './recommendationsHit';
4
4
 
5
5
  export type RecommendationsHits = {
6
6
  hits: RecommendationsHit[];
7
-
8
- /**
9
- * Text to search for in an index.
10
- */
11
- query?: string;
12
-
13
- /**
14
- * URL-encoded string of all search parameters.
15
- */
16
- params?: string;
17
7
  };