Skip to content

Commit cd5f134

Browse files
algolia-botClaraMullershortcutsgavinwade12
committed
refactor(specs): mutualise code between Search API & Comp API for search query parameters (generated)
algolia/api-clients-automation#5125 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clara Muller <[email protected]> Co-authored-by: shortcuts <[email protected]> Co-authored-by: Gavin Wade <[email protected]>
1 parent 7fe489a commit cd5f134

13 files changed

+124
-113
lines changed

packages/algoliasearch/lite/model/baseRecommendIndexSettings.ts

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.

packages/algoliasearch/lite/model/baseRecommendSearchParams.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { TagFilters } from './tagFilters';
1111

1212
export type BaseRecommendSearchParams = {
1313
/**
14-
* Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
14+
* Keywords to be used instead of the search query to conduct a more broader search Using the `similarQuery` parameter changes other settings - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords` Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
1515
*/
1616
similarQuery?: string | undefined;
1717

@@ -29,7 +29,7 @@ export type BaseRecommendSearchParams = {
2929
tagFilters?: TagFilters | undefined;
3030

3131
/**
32-
* Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
32+
* Whether to sum all filter scores If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
3333
*/
3434
sumOrFiltersScores?: boolean | undefined;
3535

@@ -39,12 +39,12 @@ export type BaseRecommendSearchParams = {
3939
restrictSearchableAttributes?: Array<string> | undefined;
4040

4141
/**
42-
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
42+
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
4343
*/
4444
facets?: Array<string> | undefined;
4545

4646
/**
47-
* Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
47+
* Whether faceting should be applied after deduplication with `distinct` This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
4848
*/
4949
facetingAfterDistinct?: boolean | undefined;
5050

@@ -75,17 +75,17 @@ export type BaseRecommendSearchParams = {
7575
insidePolygon?: Array<Array<number>> | undefined;
7676

7777
/**
78-
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
78+
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches) - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
7979
*/
8080
naturalLanguages?: Array<SupportedLanguage> | undefined;
8181

8282
/**
83-
* Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
83+
* Assigns a rule context to the search query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
8484
*/
8585
ruleContexts?: Array<string> | undefined;
8686

8787
/**
88-
* Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
88+
* Impact that Personalization should have on this search The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
8989
*/
9090
personalizationImpact?: number | undefined;
9191

@@ -105,7 +105,7 @@ export type BaseRecommendSearchParams = {
105105
synonyms?: boolean | undefined;
106106

107107
/**
108-
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
108+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
109109
*/
110110
clickAnalytics?: boolean | undefined;
111111

packages/algoliasearch/lite/model/baseSearchParamsWithoutQuery.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { TagFilters } from './tagFilters';
1111

1212
export type BaseSearchParamsWithoutQuery = {
1313
/**
14-
* Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
14+
* Keywords to be used instead of the search query to conduct a more broader search Using the `similarQuery` parameter changes other settings - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords` Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
1515
*/
1616
similarQuery?: string | undefined;
1717

@@ -29,7 +29,7 @@ export type BaseSearchParamsWithoutQuery = {
2929
tagFilters?: TagFilters | undefined;
3030

3131
/**
32-
* Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
32+
* Whether to sum all filter scores If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
3333
*/
3434
sumOrFiltersScores?: boolean | undefined;
3535

@@ -39,12 +39,12 @@ export type BaseSearchParamsWithoutQuery = {
3939
restrictSearchableAttributes?: Array<string> | undefined;
4040

4141
/**
42-
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
42+
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
4343
*/
4444
facets?: Array<string> | undefined;
4545

4646
/**
47-
* Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
47+
* Whether faceting should be applied after deduplication with `distinct` This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
4848
*/
4949
facetingAfterDistinct?: boolean | undefined;
5050

@@ -90,17 +90,17 @@ export type BaseSearchParamsWithoutQuery = {
9090
insidePolygon?: Array<Array<number>> | undefined;
9191

9292
/**
93-
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
93+
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches) - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
9494
*/
9595
naturalLanguages?: Array<SupportedLanguage> | undefined;
9696

9797
/**
98-
* Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
98+
* Assigns a rule context to the search query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
9999
*/
100100
ruleContexts?: Array<string> | undefined;
101101

102102
/**
103-
* Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
103+
* Impact that Personalization should have on this search The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
104104
*/
105105
personalizationImpact?: number | undefined;
106106

@@ -120,7 +120,7 @@ export type BaseSearchParamsWithoutQuery = {
120120
synonyms?: boolean | undefined;
121121

122122
/**
123-
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
123+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
124124
*/
125125
clickAnalytics?: boolean | undefined;
126126

0 commit comments

Comments
 (0)