@algolia/recommend 5.0.0-alpha.11 → 5.0.0-alpha.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +23 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +23 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/model/advancedSyntaxFeatures.d.ts +1 -1
- package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
- package/dist/model/alternativesAsExact.d.ts +1 -1
- package/dist/model/alternativesAsExact.d.ts.map +1 -1
- package/dist/model/anchoring.d.ts +5 -0
- package/dist/model/anchoring.d.ts.map +1 -0
- package/dist/model/aroundPrecision.d.ts +6 -0
- package/dist/model/aroundPrecision.d.ts.map +1 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts +14 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
- package/dist/model/aroundRadius.d.ts +5 -5
- package/dist/model/aroundRadius.d.ts.map +1 -1
- package/dist/model/aroundRadiusAll.d.ts +4 -1
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/automaticFacetFilter.d.ts +18 -0
- package/dist/model/automaticFacetFilter.d.ts.map +1 -0
- package/dist/model/automaticFacetFilters.d.ts +6 -0
- package/dist/model/automaticFacetFilters.d.ts.map +1 -0
- package/dist/model/baseRecommendRequest.d.ts +14 -17
- package/dist/model/baseRecommendRequest.d.ts.map +1 -1
- package/dist/model/baseRecommendationsQuery.d.ts +12 -0
- package/dist/model/baseRecommendationsQuery.d.ts.map +1 -0
- package/dist/model/baseRecommendedForYouQuery.d.ts +8 -0
- package/dist/model/baseRecommendedForYouQuery.d.ts.map +1 -0
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts +7 -0
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +1 -0
- package/dist/model/baseSearchParams.d.ts +3 -3
- package/dist/model/baseSearchParams.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +114 -122
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +109 -101
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/baseTrendingFacetsQuery.d.ts +9 -0
- package/dist/model/baseTrendingFacetsQuery.d.ts.map +1 -0
- package/dist/model/baseTrendingItemsQuery.d.ts +16 -0
- package/dist/model/baseTrendingItemsQuery.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +127 -60
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts +21 -0
- package/dist/model/condition.d.ts.map +1 -0
- package/dist/model/consequence.d.ts +26 -0
- package/dist/model/consequence.d.ts.map +1 -0
- package/dist/model/consequenceHide.d.ts +10 -0
- package/dist/model/consequenceHide.d.ts.map +1 -0
- package/dist/model/consequenceParams.d.ts +5 -0
- package/dist/model/consequenceParams.d.ts.map +1 -0
- package/dist/model/consequenceQuery.d.ts +6 -0
- package/dist/model/consequenceQuery.d.ts.map +1 -0
- package/dist/model/consequenceQueryObject.d.ts +12 -0
- package/dist/model/consequenceQueryObject.d.ts.map +1 -0
- package/dist/model/deletedAtResponse.d.ts +14 -0
- package/dist/model/deletedAtResponse.d.ts.map +1 -0
- package/dist/model/distinct.d.ts +4 -4
- package/dist/model/distinct.d.ts.map +1 -1
- package/dist/model/edit.d.ts +13 -0
- package/dist/model/edit.d.ts.map +1 -0
- package/dist/model/editType.d.ts +5 -0
- package/dist/model/editType.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts +4 -4
- package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
- package/dist/model/exhaustive.d.ts +26 -0
- package/dist/model/exhaustive.d.ts.map +1 -0
- package/dist/model/facetFilters.d.ts +5 -5
- package/dist/model/facetFilters.d.ts.map +1 -1
- package/dist/model/facetOrdering.d.ts +12 -12
- package/dist/model/facetOrdering.d.ts.map +1 -1
- package/dist/model/facets.d.ts +9 -9
- package/dist/model/facets.d.ts.map +1 -1
- package/dist/model/facetsStats.d.ts +18 -18
- package/dist/model/facetsStats.d.ts.map +1 -1
- package/dist/model/getRecommendTaskResponse.d.ts +5 -0
- package/dist/model/getRecommendTaskResponse.d.ts.map +1 -0
- package/dist/model/getRecommendationsParams.d.ts +10 -10
- package/dist/model/getRecommendationsParams.d.ts.map +1 -1
- package/dist/model/getRecommendationsResponse.d.ts +4 -4
- package/dist/model/getRecommendationsResponse.d.ts.map +1 -1
- package/dist/model/highlightResult.d.ts +2 -2
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts +19 -19
- package/dist/model/highlightResultOption.d.ts.map +1 -1
- package/dist/model/ignorePlurals.d.ts +5 -4
- package/dist/model/ignorePlurals.d.ts.map +1 -1
- package/dist/model/index.d.ts +95 -53
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +159 -160
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/matchLevel.d.ts +4 -4
- package/dist/model/matchLevel.d.ts.map +1 -1
- package/dist/model/matchedGeoLocation.d.ts +14 -14
- package/dist/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/model/mixedSearchFilters.d.ts +1 -1
- package/dist/model/mixedSearchFilters.d.ts.map +1 -1
- package/dist/model/mode.d.ts +5 -0
- package/dist/model/mode.d.ts.map +1 -0
- package/dist/model/numericFilters.d.ts +5 -5
- package/dist/model/numericFilters.d.ts.map +1 -1
- package/dist/model/optionalFilters.d.ts +5 -5
- package/dist/model/optionalFilters.d.ts.map +1 -1
- package/dist/model/params.d.ts +13 -0
- package/dist/model/params.d.ts.map +1 -0
- package/dist/model/personalization.d.ts +14 -14
- package/dist/model/personalization.d.ts.map +1 -1
- package/dist/model/promote.d.ts +4 -0
- package/dist/model/promote.d.ts.map +1 -0
- package/dist/model/promoteObjectID.d.ts +14 -0
- package/dist/model/promoteObjectID.d.ts.map +1 -0
- package/dist/model/promoteObjectIDs.d.ts +14 -0
- package/dist/model/promoteObjectIDs.d.ts.map +1 -0
- package/dist/model/queryType.d.ts +4 -4
- package/dist/model/queryType.d.ts.map +1 -1
- package/dist/model/rankingInfo.d.ts +53 -50
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts +5 -5
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/model/recommendHit.d.ts +26 -26
- package/dist/model/recommendHit.d.ts.map +1 -1
- package/dist/model/recommendModels.d.ts +2 -0
- package/dist/model/recommendModels.d.ts.map +1 -0
- package/dist/model/recommendationModels.d.ts +4 -4
- package/dist/model/recommendationModels.d.ts.map +1 -1
- package/dist/model/recommendationsHit.d.ts +4 -0
- package/dist/model/recommendationsHit.d.ts.map +1 -0
- package/dist/model/recommendationsHits.d.ts +13 -0
- package/dist/model/recommendationsHits.d.ts.map +1 -0
- package/dist/model/recommendationsQuery.d.ts +4 -0
- package/dist/model/recommendationsQuery.d.ts.map +1 -0
- package/dist/model/recommendationsRequest.d.ts +5 -3
- package/dist/model/recommendationsRequest.d.ts.map +1 -1
- package/dist/model/recommendationsResults.d.ts +4 -0
- package/dist/model/recommendationsResults.d.ts.map +1 -0
- package/dist/model/recommendedForYouModel.d.ts +5 -0
- package/dist/model/recommendedForYouModel.d.ts.map +1 -0
- package/dist/model/recommendedForYouQuery.d.ts +4 -0
- package/dist/model/recommendedForYouQuery.d.ts.map +1 -0
- package/dist/model/recommendedForYouQueryParameters.d.ts +4 -0
- package/dist/model/recommendedForYouQueryParameters.d.ts.map +1 -0
- package/dist/model/redirect.d.ts +8 -0
- package/dist/model/redirect.d.ts.map +1 -0
- package/dist/model/redirectRuleIndexMetadata.d.ts +21 -0
- package/dist/model/redirectRuleIndexMetadata.d.ts.map +1 -0
- package/dist/model/redirectRuleIndexMetadataData.d.ts +7 -0
- package/dist/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
- package/dist/model/removeStopWords.d.ts +5 -4
- package/dist/model/removeStopWords.d.ts.map +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts +4 -4
- package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
- package/dist/model/renderingContent.d.ts +7 -7
- package/dist/model/renderingContent.d.ts.map +1 -1
- package/dist/model/ruleResponse.d.ts +27 -0
- package/dist/model/ruleResponse.d.ts.map +1 -0
- package/dist/model/ruleResponseMetadata.d.ts +7 -0
- package/dist/model/ruleResponseMetadata.d.ts.map +1 -0
- package/dist/model/searchParamsObject.d.ts +3 -3
- package/dist/model/searchParamsObject.d.ts.map +1 -1
- package/dist/model/searchParamsQuery.d.ts +6 -6
- package/dist/model/searchParamsQuery.d.ts.map +1 -1
- package/dist/model/searchRecommendRulesParams.d.ts +26 -0
- package/dist/model/searchRecommendRulesParams.d.ts.map +1 -0
- package/dist/model/searchRecommendRulesResponse.d.ts +20 -0
- package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -0
- package/dist/model/semanticSearch.d.ts +10 -0
- package/dist/model/semanticSearch.d.ts.map +1 -0
- package/dist/model/snippetResult.d.ts +2 -2
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts +11 -11
- package/dist/model/snippetResultOption.d.ts.map +1 -1
- package/dist/model/sortRemainingBy.d.ts +4 -4
- package/dist/model/sortRemainingBy.d.ts.map +1 -1
- package/dist/model/supportedLanguage.d.ts +5 -0
- package/dist/model/supportedLanguage.d.ts.map +1 -0
- package/dist/model/tagFilters.d.ts +5 -5
- package/dist/model/tagFilters.d.ts.map +1 -1
- package/dist/model/taskStatus.d.ts +5 -0
- package/dist/model/taskStatus.d.ts.map +1 -0
- package/dist/model/trendingFacetHit.d.ts +18 -0
- package/dist/model/trendingFacetHit.d.ts.map +1 -0
- package/dist/model/trendingFacetsModel.d.ts +5 -0
- package/dist/model/trendingFacetsModel.d.ts.map +1 -0
- package/dist/model/trendingFacetsQuery.d.ts +4 -0
- package/dist/model/trendingFacetsQuery.d.ts.map +1 -0
- package/dist/model/trendingItemsModel.d.ts +5 -0
- package/dist/model/trendingItemsModel.d.ts.map +1 -0
- package/dist/model/trendingItemsQuery.d.ts +4 -0
- package/dist/model/trendingItemsQuery.d.ts.map +1 -0
- package/dist/model/typoTolerance.d.ts +5 -5
- package/dist/model/typoTolerance.d.ts.map +1 -1
- package/dist/model/typoToleranceEnum.d.ts +4 -1
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/value.d.ts +8 -8
- package/dist/model/value.d.ts.map +1 -1
- package/dist/recommend.cjs +390 -0
- package/dist/recommend.esm.browser.js +589 -475
- package/dist/recommend.esm.node.js +379 -235
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +131 -81
- package/dist/src/recommendClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/advancedSyntaxFeatures.ts +1 -1
- package/model/alternativesAsExact.ts +1 -1
- package/model/anchoring.ts +6 -0
- package/model/aroundPrecision.ts +8 -0
- package/model/aroundPrecisionFromValueInner.ts +16 -0
- package/model/aroundRadius.ts +2 -2
- package/model/aroundRadiusAll.ts +4 -1
- package/model/automaticFacetFilter.ts +21 -0
- package/model/automaticFacetFilters.ts +8 -0
- package/model/baseRecommendRequest.ts +5 -11
- package/model/baseRecommendationsQuery.ts +17 -0
- package/model/baseRecommendedForYouQuery.ts +12 -0
- package/model/baseRecommendedForYouQueryParameters.ts +8 -0
- package/model/baseSearchParams.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +36 -46
- package/model/baseSearchResponse.ts +42 -31
- package/model/baseTrendingFacetsQuery.ts +12 -0
- package/model/baseTrendingItemsQuery.ts +22 -0
- package/model/clientMethodProps.ts +91 -19
- package/model/condition.ts +27 -0
- package/model/consequence.ts +32 -0
- package/model/consequenceHide.ts +11 -0
- package/model/consequenceParams.ts +9 -0
- package/model/consequenceQuery.ts +8 -0
- package/model/consequenceQueryObject.ts +15 -0
- package/model/deletedAtResponse.ts +16 -0
- package/model/distinct.ts +2 -2
- package/model/edit.ts +17 -0
- package/model/editType.ts +6 -0
- package/model/errorBase.ts +1 -1
- package/model/exactOnSingleWordQuery.ts +2 -2
- package/model/exhaustive.ts +31 -0
- package/model/facetFilters.ts +2 -2
- package/model/facetOrdering.ts +3 -3
- package/model/facets.ts +3 -3
- package/model/facetsStats.ts +5 -5
- package/model/getRecommendTaskResponse.ts +7 -0
- package/model/getRecommendationsParams.ts +3 -3
- package/model/getRecommendationsResponse.ts +3 -3
- package/model/highlightResult.ts +5 -2
- package/model/highlightResultOption.ts +4 -4
- package/model/ignorePlurals.ts +5 -3
- package/model/index.ts +50 -8
- package/model/indexSettingsAsSearchParams.ts +54 -54
- package/model/matchLevel.ts +2 -2
- package/model/matchedGeoLocation.ts +1 -1
- package/model/mixedSearchFilters.ts +1 -1
- package/model/mode.ts +6 -0
- package/model/numericFilters.ts +2 -2
- package/model/optionalFilters.ts +2 -2
- package/model/params.ts +18 -0
- package/model/personalization.ts +1 -1
- package/model/promote.ts +6 -0
- package/model/promoteObjectID.ts +16 -0
- package/model/promoteObjectIDs.ts +16 -0
- package/model/queryType.ts +2 -2
- package/model/rankingInfo.ts +11 -8
- package/model/reRankingApplyFilter.ts +2 -2
- package/model/recommendHit.ts +6 -6
- package/model/recommendModels.ts +7 -0
- package/model/recommendationModels.ts +2 -2
- package/model/recommendationsHit.ts +6 -0
- package/model/recommendationsHits.ts +17 -0
- package/model/recommendationsQuery.ts +7 -0
- package/model/recommendationsRequest.ts +10 -4
- package/model/recommendationsResults.ts +6 -0
- package/model/recommendedForYouModel.ts +6 -0
- package/model/recommendedForYouQuery.ts +7 -0
- package/model/recommendedForYouQueryParameters.ts +7 -0
- package/model/redirect.ts +10 -0
- package/model/redirectRuleIndexMetadata.ts +27 -0
- package/model/redirectRuleIndexMetadataData.ts +8 -0
- package/model/removeStopWords.ts +5 -3
- package/model/removeWordsIfNoResults.ts +2 -2
- package/model/renderingContent.ts +2 -2
- package/model/ruleResponse.ts +34 -0
- package/model/ruleResponseMetadata.ts +8 -0
- package/model/searchParamsObject.ts +1 -1
- package/model/searchParamsQuery.ts +2 -2
- package/model/searchRecommendRulesParams.ts +31 -0
- package/model/searchRecommendRulesResponse.ts +25 -0
- package/model/semanticSearch.ts +11 -0
- package/model/snippetResult.ts +5 -2
- package/model/snippetResultOption.ts +3 -3
- package/model/sortRemainingBy.ts +2 -2
- package/model/supportedLanguage.ts +74 -0
- package/model/tagFilters.ts +2 -2
- package/model/taskStatus.ts +6 -0
- package/model/trendingFacetHit.ts +21 -0
- package/model/trendingFacetsModel.ts +6 -0
- package/model/trendingFacetsQuery.ts +7 -0
- package/model/trendingItemsModel.ts +6 -0
- package/model/trendingItemsQuery.ts +6 -0
- package/model/typoTolerance.ts +2 -2
- package/model/typoToleranceEnum.ts +4 -1
- package/model/value.ts +2 -2
- package/package.json +10 -9
- package/dist/model/baseRecommendationRequest.d.ts +0 -9
- package/dist/model/baseRecommendationRequest.d.ts.map +0 -1
- package/dist/model/baseTrendingRequest.d.ts +0 -13
- package/dist/model/baseTrendingRequest.d.ts.map +0 -1
- package/dist/model/recommendHits.d.ts +0 -5
- package/dist/model/recommendHits.d.ts.map +0 -1
- package/dist/model/recommendationRequest.d.ts +0 -4
- package/dist/model/recommendationRequest.d.ts.map +0 -1
- package/dist/model/recommendationsResponse.d.ts +0 -4
- package/dist/model/recommendationsResponse.d.ts.map +0 -1
- package/dist/model/trendingModels.d.ts +0 -5
- package/dist/model/trendingModels.d.ts.map +0 -1
- package/dist/model/trendingRequest.d.ts +0 -4
- package/dist/model/trendingRequest.d.ts.map +0 -1
- package/dist/recommend.cjs.js +0 -248
- package/model/baseRecommendationRequest.ts +0 -12
- package/model/baseTrendingRequest.ts +0 -17
- package/model/recommendHits.ts +0 -7
- package/model/recommendationRequest.ts +0 -7
- package/model/recommendationsResponse.ts +0 -6
- package/model/trendingModels.ts +0 -6
- package/model/trendingRequest.ts +0 -6
|
@@ -1,69 +1,58 @@
|
|
|
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
|
import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';
|
|
4
4
|
import type { AlternativesAsExact } from './alternativesAsExact';
|
|
5
5
|
import type { Distinct } from './distinct';
|
|
6
6
|
import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
|
|
7
7
|
import type { IgnorePlurals } from './ignorePlurals';
|
|
8
|
+
import type { Mode } from './mode';
|
|
8
9
|
import type { QueryType } from './queryType';
|
|
10
|
+
import type { ReRankingApplyFilter } from './reRankingApplyFilter';
|
|
9
11
|
import type { RemoveStopWords } from './removeStopWords';
|
|
10
12
|
import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
|
|
11
13
|
import type { RenderingContent } from './renderingContent';
|
|
14
|
+
import type { SemanticSearch } from './semanticSearch';
|
|
15
|
+
import type { SupportedLanguage } from './supportedLanguage';
|
|
12
16
|
import type { TypoTolerance } from './typoTolerance';
|
|
13
17
|
|
|
14
18
|
export type IndexSettingsAsSearchParams = {
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
attributesForFaceting?: string[];
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List of attributes that can\'t be retrieved at query time.
|
|
22
|
-
*/
|
|
23
|
-
unretrievableAttributes?: string[];
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* This parameter controls which attributes to retrieve and which not to retrieve.
|
|
20
|
+
* Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
27
21
|
*/
|
|
28
22
|
attributesToRetrieve?: string[];
|
|
29
23
|
|
|
30
24
|
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
restrictSearchableAttributes?: string[];
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Controls how Algolia should sort your results.
|
|
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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
|
|
37
26
|
*/
|
|
38
27
|
ranking?: string[];
|
|
39
28
|
|
|
40
29
|
/**
|
|
41
|
-
*
|
|
30
|
+
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
|
|
42
31
|
*/
|
|
43
32
|
customRanking?: string[];
|
|
44
33
|
|
|
45
34
|
/**
|
|
46
|
-
*
|
|
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.
|
|
47
36
|
*/
|
|
48
37
|
relevancyStrictness?: number;
|
|
49
38
|
|
|
50
39
|
/**
|
|
51
|
-
*
|
|
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. 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/).
|
|
52
41
|
*/
|
|
53
42
|
attributesToHighlight?: string[];
|
|
54
43
|
|
|
55
44
|
/**
|
|
56
|
-
*
|
|
45
|
+
* Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted.
|
|
57
46
|
*/
|
|
58
47
|
attributesToSnippet?: string[];
|
|
59
48
|
|
|
60
49
|
/**
|
|
61
|
-
*
|
|
50
|
+
* HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
|
62
51
|
*/
|
|
63
52
|
highlightPreTag?: string;
|
|
64
53
|
|
|
65
54
|
/**
|
|
66
|
-
*
|
|
55
|
+
* HTML tag to insert after the highlighted parts in all highlighted results and snippets.
|
|
67
56
|
*/
|
|
68
57
|
highlightPostTag?: string;
|
|
69
58
|
|
|
@@ -73,34 +62,34 @@ export type IndexSettingsAsSearchParams = {
|
|
|
73
62
|
snippetEllipsisText?: string;
|
|
74
63
|
|
|
75
64
|
/**
|
|
76
|
-
*
|
|
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.
|
|
77
66
|
*/
|
|
78
67
|
restrictHighlightAndSnippetArrays?: boolean;
|
|
79
68
|
|
|
80
69
|
/**
|
|
81
|
-
*
|
|
70
|
+
* Number of hits per page.
|
|
82
71
|
*/
|
|
83
72
|
hitsPerPage?: number;
|
|
84
73
|
|
|
85
74
|
/**
|
|
86
|
-
* Minimum number of characters a word in the query
|
|
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).
|
|
87
76
|
*/
|
|
88
77
|
minWordSizefor1Typo?: number;
|
|
89
78
|
|
|
90
79
|
/**
|
|
91
|
-
* Minimum number of characters a word in the query
|
|
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).
|
|
92
81
|
*/
|
|
93
82
|
minWordSizefor2Typos?: number;
|
|
94
83
|
|
|
95
84
|
typoTolerance?: TypoTolerance;
|
|
96
85
|
|
|
97
86
|
/**
|
|
98
|
-
* Whether to allow typos on numbers
|
|
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.
|
|
99
88
|
*/
|
|
100
89
|
allowTyposOnNumericTokens?: boolean;
|
|
101
90
|
|
|
102
91
|
/**
|
|
103
|
-
*
|
|
92
|
+
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
104
93
|
*/
|
|
105
94
|
disableTypoToleranceOnAttributes?: string[];
|
|
106
95
|
|
|
@@ -109,27 +98,27 @@ export type IndexSettingsAsSearchParams = {
|
|
|
109
98
|
removeStopWords?: RemoveStopWords;
|
|
110
99
|
|
|
111
100
|
/**
|
|
112
|
-
*
|
|
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.
|
|
113
102
|
*/
|
|
114
103
|
keepDiacriticsOnCharacters?: string;
|
|
115
104
|
|
|
116
105
|
/**
|
|
117
|
-
*
|
|
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/).
|
|
118
107
|
*/
|
|
119
|
-
queryLanguages?:
|
|
108
|
+
queryLanguages?: SupportedLanguage[];
|
|
120
109
|
|
|
121
110
|
/**
|
|
122
|
-
*
|
|
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.
|
|
123
112
|
*/
|
|
124
113
|
decompoundQuery?: boolean;
|
|
125
114
|
|
|
126
115
|
/**
|
|
127
|
-
* Whether
|
|
116
|
+
* Whether to enable rules.
|
|
128
117
|
*/
|
|
129
118
|
enableRules?: boolean;
|
|
130
119
|
|
|
131
120
|
/**
|
|
132
|
-
*
|
|
121
|
+
* Whether to enable Personalization.
|
|
133
122
|
*/
|
|
134
123
|
enablePersonalization?: boolean;
|
|
135
124
|
|
|
@@ -137,69 +126,80 @@ export type IndexSettingsAsSearchParams = {
|
|
|
137
126
|
|
|
138
127
|
removeWordsIfNoResults?: RemoveWordsIfNoResults;
|
|
139
128
|
|
|
129
|
+
mode?: Mode;
|
|
130
|
+
|
|
131
|
+
semanticSearch?: SemanticSearch;
|
|
132
|
+
|
|
140
133
|
/**
|
|
141
|
-
*
|
|
134
|
+
* Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
|
142
135
|
*/
|
|
143
136
|
advancedSyntax?: boolean;
|
|
144
137
|
|
|
145
138
|
/**
|
|
146
|
-
*
|
|
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).
|
|
147
140
|
*/
|
|
148
141
|
optionalWords?: string[];
|
|
149
142
|
|
|
150
143
|
/**
|
|
151
|
-
*
|
|
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). 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.
|
|
152
145
|
*/
|
|
153
146
|
disableExactOnAttributes?: string[];
|
|
154
147
|
|
|
155
148
|
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
|
|
156
149
|
|
|
157
150
|
/**
|
|
158
|
-
*
|
|
151
|
+
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
|
|
159
152
|
*/
|
|
160
153
|
alternativesAsExact?: AlternativesAsExact[];
|
|
161
154
|
|
|
162
155
|
/**
|
|
163
|
-
*
|
|
156
|
+
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
|
|
164
157
|
*/
|
|
165
158
|
advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
|
|
166
159
|
|
|
167
160
|
distinct?: Distinct;
|
|
168
161
|
|
|
169
162
|
/**
|
|
170
|
-
*
|
|
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.
|
|
171
164
|
*/
|
|
172
|
-
|
|
165
|
+
replaceSynonymsInHighlight?: boolean;
|
|
173
166
|
|
|
174
167
|
/**
|
|
175
|
-
*
|
|
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.
|
|
176
169
|
*/
|
|
177
|
-
|
|
170
|
+
minProximity?: number;
|
|
178
171
|
|
|
179
172
|
/**
|
|
180
|
-
*
|
|
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.
|
|
181
174
|
*/
|
|
182
|
-
|
|
175
|
+
responseFields?: string[];
|
|
183
176
|
|
|
184
177
|
/**
|
|
185
|
-
*
|
|
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).
|
|
186
179
|
*/
|
|
187
|
-
|
|
180
|
+
maxFacetHits?: number;
|
|
188
181
|
|
|
189
182
|
/**
|
|
190
|
-
*
|
|
183
|
+
* Maximum number of facet values to return for each facet.
|
|
191
184
|
*/
|
|
192
|
-
|
|
185
|
+
maxValuesPerFacet?: number;
|
|
193
186
|
|
|
194
187
|
/**
|
|
195
|
-
*
|
|
188
|
+
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
|
|
196
189
|
*/
|
|
197
|
-
|
|
190
|
+
sortFacetValuesBy?: string;
|
|
198
191
|
|
|
199
192
|
/**
|
|
200
|
-
*
|
|
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.
|
|
201
194
|
*/
|
|
202
195
|
attributeCriteriaComputedByMinProximity?: boolean;
|
|
203
196
|
|
|
204
197
|
renderingContent?: RenderingContent;
|
|
198
|
+
|
|
199
|
+
/**
|
|
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.
|
|
201
|
+
*/
|
|
202
|
+
enableReRanking?: boolean;
|
|
203
|
+
|
|
204
|
+
reRankingApplyFilter?: ReRankingApplyFilter | null;
|
|
205
205
|
};
|
package/model/matchLevel.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Whether the whole query string matches or only a part.
|
|
5
5
|
*/
|
|
6
6
|
export type MatchLevel = 'full' | 'none' | 'partial';
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
export type MatchedGeoLocation = {
|
|
4
4
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
export type MixedSearchFilters = string[] | string;
|
package/model/mode.ts
ADDED
|
@@ -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
|
+
* Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
|
|
5
|
+
*/
|
|
6
|
+
export type Mode = 'keywordSearch' | 'neuralSearch';
|
package/model/numericFilters.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Filter
|
|
6
|
+
* Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
|
|
7
7
|
*/
|
|
8
8
|
export type NumericFilters = MixedSearchFilters[] | string;
|
package/model/optionalFilters.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes.
|
|
7
7
|
*/
|
|
8
8
|
export type OptionalFilters = MixedSearchFilters[] | string;
|
package/model/params.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 { AutomaticFacetFilters } from './automaticFacetFilters';
|
|
4
|
+
import type { ConsequenceQuery } from './consequenceQuery';
|
|
5
|
+
import type { RenderingContent } from './renderingContent';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`.
|
|
9
|
+
*/
|
|
10
|
+
export type Params = {
|
|
11
|
+
query?: ConsequenceQuery;
|
|
12
|
+
|
|
13
|
+
automaticFacetFilters?: AutomaticFacetFilters;
|
|
14
|
+
|
|
15
|
+
automaticOptionalFacetFilters?: AutomaticFacetFilters;
|
|
16
|
+
|
|
17
|
+
renderingContent?: RenderingContent;
|
|
18
|
+
};
|
package/model/personalization.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
export type Personalization = {
|
|
4
4
|
/**
|
package/model/promote.ts
ADDED
|
@@ -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 { PromoteObjectID } from './promoteObjectID';
|
|
4
|
+
import type { PromoteObjectIDs } from './promoteObjectIDs';
|
|
5
|
+
|
|
6
|
+
export type Promote = PromoteObjectID | PromoteObjectIDs;
|
|
@@ -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
|
+
* Record to promote.
|
|
5
|
+
*/
|
|
6
|
+
export type PromoteObjectID = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique record identifier.
|
|
9
|
+
*/
|
|
10
|
+
objectID: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Position in the search results where you want to show the promoted records.
|
|
14
|
+
*/
|
|
15
|
+
position: number;
|
|
16
|
+
};
|
|
@@ -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
|
+
* Records to promote.
|
|
5
|
+
*/
|
|
6
|
+
export type PromoteObjectIDs = {
|
|
7
|
+
/**
|
|
8
|
+
* 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.
|
|
9
|
+
*/
|
|
10
|
+
objectIDs: string[];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Position in the search results where you want to show the promoted records.
|
|
14
|
+
*/
|
|
15
|
+
position: number;
|
|
16
|
+
};
|
package/model/queryType.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
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';
|
package/model/rankingInfo.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
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
|
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
|
-
*
|
|
11
|
+
* Whether a filter matched the query.
|
|
9
12
|
*/
|
|
10
13
|
filters: number;
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
|
-
* Position of the
|
|
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
|
-
*
|
|
45
|
+
* Whether the record was promoted by a rule.
|
|
43
46
|
*/
|
|
44
47
|
promoted: boolean;
|
|
45
48
|
|
|
46
49
|
/**
|
|
47
|
-
*
|
|
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
|
-
*
|
|
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
|
|
60
|
+
* Number of matched words.
|
|
58
61
|
*/
|
|
59
62
|
words: number;
|
|
60
63
|
|
|
61
64
|
/**
|
|
62
|
-
*
|
|
65
|
+
* Whether the record is re-ranked.
|
|
63
66
|
*/
|
|
64
67
|
promotedByReRanking?: boolean;
|
|
65
68
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
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;
|
package/model/recommendHit.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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
|
import type { HighlightResult } from './highlightResult';
|
|
4
4
|
import type { RankingInfo } from './rankingInfo';
|
|
5
5
|
import type { SnippetResult } from './snippetResult';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Recommend hit.
|
|
9
9
|
*/
|
|
10
10
|
export type RecommendHit = Record<string, any> & {
|
|
11
11
|
/**
|
|
12
|
-
* Unique identifier
|
|
12
|
+
* Unique record identifier.
|
|
13
13
|
*/
|
|
14
14
|
objectID: string;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
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
|
-
*
|
|
22
|
+
* Snippets that show the context around a matching search query.
|
|
23
23
|
*/
|
|
24
24
|
_snippetResult?: Record<string, SnippetResult>;
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ export type RecommendHit = Record<string, any> & {
|
|
|
28
28
|
_distinctSeqID?: number;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Recommendation score.
|
|
32
32
|
*/
|
|
33
33
|
_score: number;
|
|
34
34
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export type RecommendModels =
|
|
4
|
+
| 'bought-together'
|
|
5
|
+
| 'related-products'
|
|
6
|
+
| 'trending-facets'
|
|
7
|
+
| 'trending-items';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Recommendation model.
|
|
5
5
|
*/
|
|
6
6
|
export type RecommendationModels = 'bought-together' | 'related-products';
|
|
@@ -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 { RecommendHit } from './recommendHit';
|
|
4
|
+
import type { TrendingFacetHit } from './trendingFacetHit';
|
|
5
|
+
|
|
6
|
+
export type RecommendationsHit = RecommendHit | TrendingFacetHit;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { RecommendationsHit } from './recommendationsHit';
|
|
4
|
+
|
|
5
|
+
export type RecommendationsHits = {
|
|
6
|
+
hits: RecommendationsHit[];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Search query.
|
|
10
|
+
*/
|
|
11
|
+
query?: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* URL-encoded string of all search parameters.
|
|
15
|
+
*/
|
|
16
|
+
params?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { BaseRecommendationsQuery } from './baseRecommendationsQuery';
|
|
5
|
+
|
|
6
|
+
export type RecommendationsQuery = BaseRecommendationsQuery &
|
|
7
|
+
BaseRecommendRequest;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { RecommendationsQuery } from './recommendationsQuery';
|
|
4
|
+
import type { RecommendedForYouQuery } from './recommendedForYouQuery';
|
|
5
|
+
import type { TrendingFacetsQuery } from './trendingFacetsQuery';
|
|
6
|
+
import type { TrendingItemsQuery } from './trendingItemsQuery';
|
|
5
7
|
|
|
6
|
-
export type RecommendationsRequest =
|
|
8
|
+
export type RecommendationsRequest =
|
|
9
|
+
| RecommendationsQuery
|
|
10
|
+
| RecommendedForYouQuery
|
|
11
|
+
| TrendingFacetsQuery
|
|
12
|
+
| TrendingItemsQuery;
|
|
@@ -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 { BaseSearchResponse } from './baseSearchResponse';
|
|
4
|
+
import type { RecommendationsHits } from './recommendationsHits';
|
|
5
|
+
|
|
6
|
+
export type RecommendationsResults = BaseSearchResponse & RecommendationsHits;
|
|
@@ -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
|
+
* Recommended for you model.
|
|
5
|
+
*/
|
|
6
|
+
export type RecommendedForYouModel = 'recommended-for-you';
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { BaseRecommendedForYouQuery } from './baseRecommendedForYouQuery';
|
|
5
|
+
|
|
6
|
+
export type RecommendedForYouQuery = BaseRecommendedForYouQuery &
|
|
7
|
+
BaseRecommendRequest;
|