From a5bce076c68b322a588d0f527f881c7611f50592 Mon Sep 17 00:00:00 2001
From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
Date: Wed, 16 Jul 2025 18:05:47 +0200
Subject: [PATCH 1/8] refactor(specs): mutualise code between Search API & Comp
API for search query parameters
---
specs/common/schemas/IndexSettings.yml | 698 ++++++++++--------
specs/common/schemas/SearchParams.yml | 493 +++++++------
.../composition-full/common/params/Search.yml | 456 ++----------
3 files changed, 686 insertions(+), 961 deletions(-)
diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml
index 5bd58247195..a66eb7e49bc 100644
--- a/specs/common/schemas/IndexSettings.yml
+++ b/specs/common/schemas/IndexSettings.yml
@@ -333,25 +333,7 @@ indexSettingsAsSearchParams:
additionalProperties: false
properties:
attributesToRetrieve:
- type: array
- items:
- type: string
- example:
- - author
- - title
- - content
- description: |
- 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.
- default: ['*']
- x-categories:
- - Attributes
+ $ref: '#/attributesToRetrieve'
ranking:
type: array
items:
@@ -386,174 +368,43 @@ indexSettingsAsSearchParams:
x-categories:
- Ranking
relevancyStrictness:
- type: integer
- example: 90
- description: |
- 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.
- default: 100
- x-categories:
- - Ranking
+ $ref: '#/relevancyStrictness'
attributesToHighlight:
- type: array
- items:
- type: string
- example: [author, title, conten, content]
- description: |
- 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/).
- x-categories:
- - Highlighting and Snippeting
+ $ref: '#/attributesToHighlight'
attributesToSnippet:
- type: array
- items:
- type: string
- example:
- - content:80
- - description
- description: |
- 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.
- default: []
- x-categories:
- - Highlighting and Snippeting
+ $ref: '#/attributesToSnippet'
highlightPreTag:
- type: string
- description: HTML tag to insert before the highlighted parts in all highlighted results and snippets.
- default:
- x-categories:
- - Highlighting and Snippeting
+ $ref: '#/highlightPreTag'
highlightPostTag:
- type: string
- description: HTML tag to insert after the highlighted parts in all highlighted results and snippets.
- default:
- x-categories:
- - Highlighting and Snippeting
+ $ref: '#/highlightPostTag'
snippetEllipsisText:
- type: string
- description: String used as an ellipsis indicator when a snippet is truncated.
- default: …
- x-categories:
- - Highlighting and Snippeting
+ $ref: '#/snippetEllipsisText'
restrictHighlightAndSnippetArrays:
- type: boolean
- description: |
- Whether to restrict highlighting and snippeting to items that at least partially matched the search query.
- By default, all items are highlighted and snippeted.
- default: false
- x-categories:
- - Highlighting and Snippeting
+ $ref: '#/restrictHighlightAndSnippetArrays'
hitsPerPage:
$ref: '#/hitsPerPage'
minWordSizefor1Typo:
- type: integer
- description: 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).
- default: 4
- x-categories:
- - Typos
+ $ref: '#/minWordSizefor1Typo'
minWordSizefor2Typos:
- type: integer
- description: 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).
- default: 8
- x-categories:
- - Typos
+ $ref: '#/minWordSizefor2Typos'
typoTolerance:
$ref: '#/typoTolerance'
allowTyposOnNumericTokens:
- type: boolean
- description: |
- 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.
- default: true
- x-categories:
- - Typos
+ $ref: '#/allowTyposOnNumericTokens'
disableTypoToleranceOnAttributes:
- type: array
- items:
- type: string
- example:
- - sku
- description: |
- 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.
- default: []
- x-categories:
- - Typos
+ $ref: '#/disableTypoToleranceOnAttributes'
ignorePlurals:
$ref: '#/ignorePlurals'
removeStopWords:
$ref: '#/removeStopWords'
queryLanguages:
- type: array
- items:
- $ref: '#/supportedLanguage'
- example:
- - es
- description: |
- 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/).
- default: []
- x-categories:
- - Languages
+ $ref: '#/queryLanguages'
decompoundQuery:
- type: boolean
- description: |
- Whether to split compound words in the query into their building blocks.
-
- For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).
- Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
- Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).
- For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
- default: true
- x-categories:
- - Languages
+ $ref: '#/decompoundQuery'
enableRules:
- type: boolean
- description: Whether to enable rules.
- default: true
- x-categories:
- - Rules
+ $ref: '#/enableRules'
enablePersonalization:
- type: boolean
- description: Whether to enable Personalization.
- default: false
- x-categories:
- - Personalization
+ $ref: '#/enablePersonalization'
queryType:
$ref: '#/queryType'
removeWordsIfNoResults:
@@ -563,181 +414,260 @@ indexSettingsAsSearchParams:
semanticSearch:
$ref: '#/semanticSearch'
advancedSyntax:
- type: boolean
- description: |
- Whether to support phrase matching and excluding words from search queries.
-
- Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
- default: false
+ $ref: '#/advancedSyntax'
x-categories:
- Query strategy
optionalWords:
$ref: '#/optionalWords'
disableExactOnAttributes:
- type: array
- items:
- type: string
- example:
- - description
- description: |
- Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
- Attribute names are case-sensitive.
-
- This can be useful for attributes with long values, where the likelihood of an exact match is high,
- such as product descriptions.
- Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes.
- This reduces the impact of individual attributes with a lot of content on ranking.
- default: []
- x-categories:
- - Query strategy
+ $ref: '#/disableExactOnAttributes'
exactOnSingleWordQuery:
$ref: '#/exactOnSingleWordQuery'
alternativesAsExact:
- type: array
- items:
- $ref: '#/alternativesAsExact'
- description: |
- Determine which plurals and synonyms should be considered an exact matches.
-
- By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.
- For example:
-
- - "swimsuit" and "swimsuits" are treated the same
- - "swimsuit" and "swimwear" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).
+ $ref: '#/alternativesAsExact'
+ advancedSyntaxFeatures:
+ $ref: '#/advancedSyntaxFeatures'
+ distinct:
+ $ref: '#/distinct'
+ replaceSynonymsInHighlight:
+ $ref: '#/replaceSynonymsInHighlight'
+ minProximity:
+ $ref: '#/minProximity'
+ responseFields:
+ $ref: '#/responseFields'
+ maxValuesPerFacet:
+ $ref: '#/maxValuesPerFacet'
+ sortFacetValuesBy:
+ $ref: '#/sortFacetValuesBy'
+ attributeCriteriaComputedByMinProximity:
+ $ref: '#/attributeCriteriaComputedByMinProximity'
+ renderingContent:
+ $ref: '#/renderingContent'
+ enableReRanking:
+ $ref: '#/enableReRanking'
+ reRankingApplyFilter:
+ oneOf:
+ - $ref: '#/reRankingApplyFilter'
+ - type: 'null'
- - `ignorePlurals`.
- Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
+#
+# Schemas for index settings that can be used as search parameters
+#
- - `singleWordSynonym`.
- Single-word synonyms, such as "NY" = "NYC", are considered exact matches.
+advancedSyntax:
+ type: boolean
+ description: |
+ Whether to support phrase matching and excluding words from search queries
+ Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
+ default: false
- - `multiWordsSynonym`.
- Multi-word synonyms, such as "NY" = "New York", are considered exact matches.
- default: [ignorePlurals, singleWordSynonym]
- x-categories:
- - Query strategy
- advancedSyntaxFeatures:
- type: array
- items:
- $ref: '#/advancedSyntaxFeatures'
- description: |
- Advanced search syntax features you want to support.
+advancedSyntaxFeatures:
+ type: array
+ items:
+ $ref: '#/advancedSyntaxFeaturesEnum'
+ description: |
+ 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.
+ default: [exactPhrase, excludeWords]
+ x-categories:
+ - Query strategy
- - `exactPhrase`.
- Phrases in quotes must match exactly.
- For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
+advancedSyntaxFeaturesEnum:
+ type: string
+ enum: [exactPhrase, excludeWords]
+ x-categories:
+ - Query strategy
- - `excludeWords`.
- Query words prefixed with a `-` must not occur in a record.
- For example, `search -engine` matches records that contain "search" but not "engine".
+allowTyposOnNumericTokens:
+ type: boolean
+ description: |
+ 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.
+ default: true
+ x-categories:
+ - Typos
- This setting only has an effect if `advancedSyntax` is true.
- default: [exactPhrase, excludeWords]
- x-categories:
- - Query strategy
- distinct:
- $ref: '#/distinct'
- replaceSynonymsInHighlight:
- type: boolean
- description: |
- Whether to replace a highlighted word with the matched synonym.
+alternativesAsExact:
+ type: array
+ items:
+ $ref: '#/alternativesAsExactEnum'
+ description: |
+ Determine which plurals and synonyms should be considered an exact matches
+ By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.
+ For example
+ - "swimsuit" and "swimsuits" are treated the same
+ - "swimsuit" and "swimwear" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms))
+ - `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.
+ default: [ignorePlurals, singleWordSynonym]
+ x-categories:
+ - Query strategy
- 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.
+alternativesAsExactEnum:
+ type: string
+ enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym, ignoreConjugations]
+ x-categories:
+ - Query strategy
- With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,
- but all occurrences of "house" are replaced by "home" in the highlighted response.
- default: false
- x-categories:
- - Highlighting and Snippeting
- minProximity:
- type: integer
- minimum: 1
- maximum: 7
- description: |
- Minimum proximity score for two matching words.
+attributeCriteriaComputedByMinProximity:
+ type: boolean
+ description: |
+ Whether the best matching attribute should be determined by minimum proximit
+ 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.
+ default: false
+ x-categories:
+ - Advanced
- 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.
+attributesToHighlight:
+ type: array
+ items:
+ type: string
+ example: [author, title, conten, content]
+ description: |
+ 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/).
+ x-categories:
+ - Highlighting and Snippeting
- For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
- default: 1
- x-categories:
- - Advanced
- responseFields:
- type: array
- items:
- type: string
- description: |
- Properties to include in the API response of search and browse requests.
+attributesToSnippet:
+ type: array
+ items:
+ type: string
+ example:
+ - content:80
+ - description
+ description: |
+ 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.
+ default: []
+ x-categories:
+ - Highlighting and Snippeting
- By default, all response properties are included.
- To reduce the response size, you can select which properties should be included.
+attributesToRetrieve:
+ type: array
+ items:
+ type: string
+ example:
+ - author
+ - title
+ - content
+ description: |
+ 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.
+ default: ['*']
+ x-categories:
+ - Attributes
- An empty list may lead to an empty API response (except properties you can't exclude).
+disableExactOnAttributes:
+ type: array
+ items:
+ type: string
+ example:
+ - description
+ description: |
+ Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
+ Attribute names are case-sensitive
+ This can be useful for attributes with long values, where the likelihood of an exact match is high,
+ such as product descriptions.
+ Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes.
+ This reduces the impact of individual attributes with a lot of content on ranking.
+ default: []
+ x-categories:
+ - Query strategy
- You can't exclude these properties:
- `message`, `warning`, `cursor`, `abTestVariantID`,
- or any property added by setting `getRankingInfo` to true.
+decompoundQuery:
+ type: boolean
+ description: |
+ Whether to split compound words in the query into their building blocks
+ For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).
+ Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
+ Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).
+ For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
+ default: true
+ x-categories:
+ - Languages
- Your search depends on the `hits` field. If you omit this field, searches won't return any results.
- Your UI might also depend on other properties, for example, for pagination.
- Before restricting the response size, check the impact on your search experience.
- default: ['*']
- x-categories:
- - Advanced
- maxValuesPerFacet:
- type: integer
- description: Maximum number of facet values to return for each facet.
- default: 100
- maximum: 1000
- x-categories:
- - Faceting
- sortFacetValuesBy:
- type: string
- description: |
- Order in which to retrieve facet values.
+disableTypoToleranceOnAttributes:
+ type: array
+ items:
+ type: string
+ example:
+ - sku
+ description: |
+ 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.
+ default: []
+ x-categories:
+ - Typos
- - `count`.
- Facet values are retrieved by decreasing count.
- The count is the number of matching records containing this facet value.
+enablePersonalization:
+ type: boolean
+ description: Whether to enable Personalization.
+ default: false
+ x-categories:
+ - Personalization
- - `alpha`.
- Retrieve facet values alphabetically.
+enableReRanking:
+ type: boolean
+ description: |
+ 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.
+ default: true
+ x-categories:
+ - Filtering
- 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/).
- default: count
- x-categories:
- - Faceting
- attributeCriteriaComputedByMinProximity:
- type: boolean
- description: |
- Whether the best matching attribute should be determined by minimum proximity.
+enableRules:
+ type: boolean
+ description: Whether to enable rules.
+ default: true
+ x-categories:
+ - Rules
- 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.
- default: false
- x-categories:
- - Advanced
- renderingContent:
- $ref: '#/renderingContent'
- enableReRanking:
- type: boolean
- description: |
- Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
+highlightPreTag:
+ type: string
+ description: HTML tag to insert before the highlighted parts in all highlighted results and snippets.
+ default:
+ x-categories:
+ - Highlighting and Snippeting
- This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
- default: true
- x-categories:
- - Filtering
- reRankingApplyFilter:
- oneOf:
- - $ref: '#/reRankingApplyFilter'
- - type: 'null'
+highlightPostTag:
+ type: string
+ description: HTML tag to insert after the highlighted parts in all highlighted results and snippets.
+ default:
+ x-categories:
+ - Highlighting and Snippeting
maxFacetHits:
type: integer
@@ -747,6 +677,41 @@ maxFacetHits:
x-categories:
- Advanced
+maxValuesPerFacet:
+ type: integer
+ description: Maximum number of facet values to return for each facet.
+ default: 100
+ maximum: 1000
+ x-categories:
+ - Faceting
+
+minProximity:
+ type: integer
+ minimum: 1
+ maximum: 7
+ description: |
+ 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.
+ default: 1
+ x-categories:
+ - Advanced
+
+minWordSizefor1Typo:
+ type: integer
+ description: 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).
+ default: 4
+ x-categories:
+ - Typos
+
+minWordSizefor2Typos:
+ type: integer
+ description: 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).
+ default: 8
+ x-categories:
+ - Typos
+
reRankingApplyFilter:
description: |
Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
@@ -779,6 +744,26 @@ userData:
x-categories:
- Advanced
+queryLanguages:
+ type: array
+ items:
+ $ref: '#/supportedLanguage'
+ example:
+ - es
+ description: |
+ Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionarie
+ 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/).
+ default: []
+ x-categories:
+ - Languages
+
queryType:
type: string
enum:
@@ -867,18 +852,6 @@ exactOnSingleWordQuery:
x-categories:
- Query strategy
-alternativesAsExact:
- type: string
- enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym, ignoreConjugations]
- x-categories:
- - Query strategy
-
-advancedSyntaxFeatures:
- type: string
- enum: [exactPhrase, excludeWords]
- x-categories:
- - Query strategy
-
distinct:
description: |
Determines how many records of a group are included in the search results.
@@ -1251,3 +1224,78 @@ optionalWordsArray:
default: []
x-categories:
- Query strategy
+
+relevancyStrictness:
+ type: integer
+ example: 90
+ description: |
+ 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.
+ default: 100
+ x-categories:
+ - Ranking
+
+replaceSynonymsInHighlight:
+ type: boolean
+ description: |
+ Whether to replace a highlighted word with the matched synonym
+ By default, the original words are highlighted even if a synonym matches.
+ For example, with `home` as a synonym for `house` and a search for `home`,
+ records matching either "home" or "house" are included in the search results,
+ and either "home" or "house" are highlighted
+ With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,
+ but all occurrences of "house" are replaced by "home" in the highlighted response.
+ default: false
+ x-categories:
+ - Highlighting and Snippeting
+
+responseFields:
+ type: array
+ items:
+ type: string
+ description: |
+ 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 properties should be included
+ An empty list may lead to an empty API response (except properties you can't exclude)
+ You can't exclude these properties:
+ `message`, `warning`, `cursor`, `abTestVariantID`,
+ or any property added by setting `getRankingInfo` to true
+ Your search depends on the `hits` field. If you omit this field, searches won't return any results.
+ Your UI might also depend on other properties, for example, for pagination.
+ Before restricting the response size, check the impact on your search experience.
+ default: ['*']
+ x-categories:
+ - Advanced
+
+restrictHighlightAndSnippetArrays:
+ type: boolean
+ description: |
+ Whether to restrict highlighting and snippeting to items that at least partially matched the search query.
+ By default, all items are highlighted and snippeted.
+ default: false
+ x-categories:
+ - Highlighting and Snippeting
+
+sortFacetValuesBy:
+ type: string
+ description: |
+ 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/).
+ default: count
+ x-categories:
+ - Faceting
+
+snippetEllipsisText:
+ type: string
+ description: String used as an ellipsis indicator when a snippet is truncated.
+ default: …
+ x-categories:
+ - Highlighting and Snippeting
\ No newline at end of file
diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml
index 1fc1a047eae..d4fe968f36d 100644
--- a/specs/common/schemas/SearchParams.yml
+++ b/specs/common/schemas/SearchParams.yml
@@ -27,23 +27,7 @@ baseSearchParamsWithoutQuery:
additionalProperties: false
properties:
similarQuery:
- type: string
- description: |
- 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.
- default: ''
- example: 'comedy drama crime Macy Buscemi'
- x-categories:
- - Search
+ $ref: '#/similarQuery'
filters:
$ref: '#/filters'
facetFilters:
@@ -55,51 +39,13 @@ baseSearchParamsWithoutQuery:
tagFilters:
$ref: '#/tagFilters'
sumOrFiltersScores:
- type: boolean
- description: |
- 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).
- default: false
- x-categories:
- - Filtering
+ $ref: '#/sumOrFiltersScores'
restrictSearchableAttributes:
- type: array
- items:
- type: string
- example: [title, author]
- description: |
- Restricts a search to a subset of your searchable attributes.
- Attribute names are case-sensitive.
- default: []
- x-categories:
- - Filtering
+ $ref: '#/restrictSearchableAttributes'
facets:
- type: array
- items:
- type: string
- description: |
- 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).
- default: []
- example: ['*']
- x-categories:
- - Faceting
+ $ref: '#/facets'
facetingAfterDistinct:
- type: boolean
- description: |
- 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`.
- default: false
- x-categories:
- - Faceting
+ $ref: '#/facetingAfterDistinct'
page:
$ref: '#/page'
offset:
@@ -108,12 +54,7 @@ baseSearchParamsWithoutQuery:
x-categories:
- Pagination
length:
- type: integer
- description: Number of hits to retrieve (used in combination with `offset`).
- minimum: 0
- maximum: 1000
- x-categories:
- - Pagination
+ $ref: '#/length'
aroundLatLng:
$ref: '#/aroundLatLng'
aroundLatLngViaIP:
@@ -123,101 +64,35 @@ baseSearchParamsWithoutQuery:
aroundPrecision:
$ref: '#/aroundPrecision'
minimumAroundRadius:
- type: integer
- description: Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
- minimum: 1
- x-categories:
- - Geo-Search
+ $ref: '#/minimumAroundRadius'
insideBoundingBox:
$ref: '#/insideBoundingBox'
insidePolygon:
$ref: '#/insidePolygon'
naturalLanguages:
- type: array
- items:
- $ref: './IndexSettings.yml#/supportedLanguage'
- description: |
- 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`.
- default: []
- x-categories:
- - Languages
+ $ref: '#/naturalLanguages'
ruleContexts:
- type: array
- items:
- type: string
- description: |
- 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.
- default: []
- example: [mobile]
- x-categories:
- - Rules
+ $ref: '#/ruleContexts'
personalizationImpact:
- type: integer
- description: |
- 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).
- default: 100
- minimum: 0
- maximum: 100
- x-categories:
- - Personalization
+ $ref: '#/personalizationImpact'
userToken:
$ref: '#/userToken'
getRankingInfo:
- type: boolean
- description: Whether the search response should include detailed ranking information.
- default: false
- x-categories:
- - Advanced
+ $ref: '#/getRankingInfo'
synonyms:
- type: boolean
- description: Whether to take into account an index's synonyms for this search.
- default: true
- x-categories:
- - Advanced
+ $ref: '#/synonyms'
clickAnalytics:
- type: boolean
- description: |
- 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/).
- default: false
- x-categories:
- - Analytics
+ $ref: '#/clickAnalytics'
analytics:
- type: boolean
- description: Whether this search will be included in Analytics.
- default: true
- x-categories:
- - Analytics
+ $ref: '#/analyticsTags'
analyticsTags:
- type: array
- items:
- type: string
- description: Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
- default: []
+ $ref: '#/analyticsTags'
x-categories:
- Analytics
percentileComputation:
- type: boolean
- description: Whether to include this search when calculating processing-time percentiles.
- default: true
- x-categories:
- - Advanced
+ $ref: '#/percentileComputation'
enableABTest:
- type: boolean
- description: Whether to enable A/B testing for this search.
- default: true
- x-categories:
- - Advanced
+ $ref: '#/enableABTest'
searchParamsString:
type: object
@@ -236,31 +111,23 @@ paramsAsString:
type: string
default: ''
-userToken:
- type: string
- description: |
- Unique pseudonymous or anonymous user identifier.
-
- This helps with analytics and click and conversion events.
- For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
- example: test-user-123
- x-categories:
- - Personalization
+#
+# Schemas for search parameters
+#
-query:
- type: string
- description: Search query.
- default: ''
+analytics:
+ type: boolean
+ description: Whether this search will be included in Analytics.
+ default: true
x-categories:
- - Search
+ - Analytics
-page:
- type: integer
- description: Page of search results to retrieve.
- default: 0
- minimum: 0
- x-categories:
- - Pagination
+analyticsTags:
+ type: array
+ items:
+ type: string
+ description: Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
+ default: []
aroundRadius:
description: |
@@ -336,6 +203,104 @@ aroundLatLngViaIP:
x-categories:
- Geo-Search
+clickAnalytics:
+ type: boolean
+ description: |
+ 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/).
+ default: false
+ x-categories:
+ - Analytics
+
+enableABTest:
+ type: boolean
+ description: Whether to enable A/B testing for this search.
+ default: true
+ x-categories:
+ - Advanced
+
+facets:
+ type: array
+ items:
+ type: string
+ description: |
+ 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).
+ default: []
+ example: ['*']
+ x-categories:
+ - Faceting
+
+facetFilters:
+ description: |
+ Filter the search by facet values, so that only records with the same facet values are retrieved.
+
+ **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
+
+ - `[filter1, filter2]` is interpreted as `filter1 AND filter2`.
+ - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.
+ - `facet:-value` is interpreted as `NOT facet:value`.
+
+ While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:
+ `facet:\-value`.
+ example: [['category:Book', 'category:-Movie'], 'author:John Doe']
+ oneOf:
+ - type: array
+ items:
+ $ref: '#/facetFilters'
+ - type: string
+ x-categories:
+ - Filtering
+
+facetingAfterDistinct:
+ type: boolean
+ description: |
+ 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`.
+ default: false
+ x-categories:
+ - Faceting
+
+filters:
+ type: string
+ description: |
+ Filter expression to only include items that match the filter criteria in the response.
+
+ You can use these filter expressions:
+
+ - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.
+ - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive).
+ - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value.
+ - **Tag filters.** `_tags:` or just `` (case-sensitive).
+ - **Boolean filters.** `: 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/).
+ example: '(category:Book OR category:Ebook) AND _tags:published'
+ x-categories:
+ - Filtering
+
+getRankingInfo:
+ type: boolean
+ description: Whether the search response should include detailed ranking information.
+ default: false
+ x-categories:
+ - Advanced
+
insideBoundingBox:
oneOf:
- type: string
@@ -386,74 +351,40 @@ insidePolygon:
x-categories:
- Geo-Search
-filters:
+query:
type: string
- description: |
- Filter expression to only include items that match the filter criteria in the response.
-
- You can use these filter expressions:
-
- - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.
- - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive).
- - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value.
- - **Tag filters.** `_tags:` or just `` (case-sensitive).
- - **Boolean filters.** `: 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/).
- example: '(category:Book OR category:Ebook) AND _tags:published'
+ description: Search query.
+ default: ''
x-categories:
- - Filtering
-
-facetFilters:
- description: |
- Filter the search by facet values, so that only records with the same facet values are retrieved.
-
- **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
+ - Search
- - `[filter1, filter2]` is interpreted as `filter1 AND filter2`.
- - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.
- - `facet:-value` is interpreted as `NOT facet:value`.
+length:
+ type: integer
+ description: Number of hits to retrieve (used in combination with `offset`).
+ minimum: 0
+ maximum: 1000
+ x-categories:
+ - Pagination
- While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:
- `facet:\-value`.
- example: [['category:Book', 'category:-Movie'], 'author:John Doe']
- oneOf:
- - type: array
- items:
- $ref: '#/facetFilters'
- - type: string
+minimumAroundRadius:
+ type: integer
+ description: Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
+ minimum: 1
x-categories:
- - Filtering
+ - Geo-Search
-tagFilters:
+naturalLanguages:
+ type: array
+ items:
+ $ref: './IndexSettings.yml#/supportedLanguage'
description: |
- Filter the search by values of the special `_tags` attribute.
-
- **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
-
- Different from regular facets, `_tags` can only be used for filtering (including or excluding records).
- You won't get a facet count.
- The same combination and escaping rules apply as for `facetFilters`.
- example: [['Book', 'Movie'], 'SciFi']
- oneOf:
- - type: array
- items:
- $ref: '#/tagFilters'
- - type: string
+ 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`.
+ default: []
x-categories:
- - Filtering
+ - Languages
numericFilters:
description: |
@@ -495,3 +426,117 @@ optionalFilters:
- type: string
x-categories:
- Filtering
+
+page:
+ type: integer
+ description: Page of search results to retrieve.
+ default: 0
+ minimum: 0
+ x-categories:
+ - Pagination
+
+percentileComputation:
+ type: boolean
+ description: Whether to include this search when calculating processing-time percentiles.
+ default: true
+ x-categories:
+ - Advanced
+
+personalizationImpact:
+ type: integer
+ description: |
+ 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).
+ default: 100
+ minimum: 0
+ maximum: 100
+ x-categories:
+ - Personalization
+
+restrictSearchableAttributes:
+ type: array
+ items:
+ type: string
+ example: [title, author]
+ description: |
+ Restricts a search to a subset of your searchable attributes.
+ Attribute names are case-sensitive.
+ default: []
+ x-categories:
+ - Filtering
+
+ruleContexts:
+ type: array
+ items:
+ type: string
+ description: |
+ 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.
+ default: []
+ example: [mobile]
+ x-categories:
+ - Rules
+
+similarQuery:
+ type: string
+ description: |
+ 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.
+ default: ''
+ example: 'comedy drama crime Macy Buscemi'
+ x-categories:
+ - Search
+
+sumOrFiltersScores:
+ type: boolean
+ description: |
+ 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).
+ default: false
+ x-categories:
+ - Filtering
+
+synonyms:
+ type: boolean
+ description: Whether to take into account an index's synonyms for this search.
+ default: true
+ x-categories:
+ - Advanced
+
+tagFilters:
+ description: |
+ Filter the search by values of the special `_tags` attribute.
+
+ **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
+
+ Different from regular facets, `_tags` can only be used for filtering (including or excluding records).
+ You won't get a facet count.
+ The same combination and escaping rules apply as for `facetFilters`.
+ example: [['Book', 'Movie'], 'SciFi']
+ oneOf:
+ - type: array
+ items:
+ $ref: '#/tagFilters'
+ - type: string
+ x-categories:
+ - Filtering
+
+userToken:
+ type: string
+ description: |
+ Unique pseudonymous or anonymous user identifier.
+
+ This helps with analytics and click and conversion events.
+ For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
+ example: test-user-123
+ x-categories:
+ - Personalization
\ No newline at end of file
diff --git a/specs/composition-full/common/params/Search.yml b/specs/composition-full/common/params/Search.yml
index a2c18b5f17f..9da32f1d95a 100644
--- a/specs/composition-full/common/params/Search.yml
+++ b/specs/composition-full/common/params/Search.yml
@@ -1,77 +1,23 @@
advancedSyntax:
- type: boolean
- description: |
- Whether to support phrase matching and excluding words from search queries
- Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
- default: false
- x-categories:
- - Query strategy
+ $ref: '../../../common/schemas/IndexSettings.yml#/advancedSyntax'
advancedSyntaxFeatures:
- type: array
- items:
- $ref: '../../../common/schemas/IndexSettings.yml#/advancedSyntaxFeatures'
- description: |
- 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.
- default: [exactPhrase, excludeWords]
- x-categories:
- - Query strategy
+ $ref: '../../../common/schemas/IndexSettings.yml#/advancedSyntaxFeatures'
distinct:
$ref: '../../../common/schemas/IndexSettings.yml#/distinct'
allowTyposOnNumericTokens:
- type: boolean
- description: |
- 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.
- default: true
- x-categories:
- - Typos
+ $ref: '../../../common/schemas/IndexSettings.yml#/allowTyposOnNumericTokens'
alternativesAsExact:
- type: array
- items:
- $ref: '../../../common/schemas/IndexSettings.yml#/alternativesAsExact'
- description: |
- Determine which plurals and synonyms should be considered an exact matches
- By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.
- For example
- - "swimsuit" and "swimsuits" are treated the same
- - "swimsuit" and "swimwear" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms))
- - `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.
- default: [ignorePlurals, singleWordSynonym]
- x-categories:
- - Query strategy
+ $ref: '../../../common/schemas/IndexSettings.yml#/alternativesAsExact'
analytics:
- type: boolean
- description: Whether this search will be included in Analytics.
- default: true
- x-categories:
- - Analytics
+ $ref: '../../../common/schemas/SearchParams.yml#/analytics'
analyticsTags:
- type: array
- items:
- type: string
- description: Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
- default: []
- x-categories:
- - Analytics
+ $ref: '../../../common/schemas/SearchParams.yml#/analyticsTags'
aroundLatLng:
$ref: '../../../common/schemas/SearchParams.yml#/aroundLatLng'
@@ -86,208 +32,64 @@ aroundRadius:
$ref: '../../../common/schemas/SearchParams.yml#/aroundRadius'
attributeCriteriaComputedByMinProximity:
- type: boolean
- description: |
- 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.
- default: false
- x-categories:
- - Advanced
+ $ref: '../../../common/schemas/IndexSettings.yml#/attributeCriteriaComputedByMinProximity'
attributesToHighlight:
- type: array
- items:
- type: string
- example: [author, title, content]
- description: |
- 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/).
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/attributesToHighlight'
attributesToSnippet:
- type: array
- items:
- type: string
- example:
- - content:80
- - description
- description: |
- 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.
- default: []
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/attributesToSnippet'
attributesToRetrieve:
- type: array
- items:
- type: string
- example:
- - author
- - title
- - content
- description: |
- 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.
- default: ['*']
- x-categories:
- - Attributes
+ $ref: '../../../common/schemas/IndexSettings.yml#/attributesToRetrieve'
clickAnalytics:
- type: boolean
- description: |
- 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/).
- default: false
- x-categories:
- - Analytics
+ $ref: '../../../common/schemas/SearchParams.yml#/clickAnalytics'
disableExactOnAttributes:
- type: array
- items:
- type: string
- example:
- - description
- description: |
- Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
- Attribute names are case-sensitive
- This can be useful for attributes with long values, where the likelihood of an exact match is high,
- such as product descriptions.
- Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes.
- This reduces the impact of individual attributes with a lot of content on ranking.
- default: []
- x-categories:
- - Query strategy
+ $ref: '../../../common/schemas/IndexSettings.yml#/disableExactOnAttributes'
decompoundQuery:
- type: boolean
- description: |
- Whether to split compound words in the query into their building blocks
- For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).
- Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
- Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).
- For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
- default: true
- x-categories:
- - Languages
+ $ref: '../../../common/schemas/IndexSettings.yml#/decompoundQuery'
disableTypoToleranceOnAttributes:
- type: array
- items:
- type: string
- example:
- - sku
- description: |
- 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.
- default: []
- x-categories:
- - Typos
+ $ref: '../../../common/schemas/IndexSettings.yml#/disableTypoToleranceOnAttributes'
enableABTest:
- type: boolean
- description: Whether to enable A/B testing for this search.
- default: true
- x-categories:
- - Advanced
+ $ref: '../../../common/schemas/SearchParams.yml#/enableABTest'
enablePersonalization:
- type: boolean
- description: Whether to enable Personalization.
- default: false
- x-categories:
- - Personalization
+ $ref: '../../../common/schemas/IndexSettings.yml#/enablePersonalization'
enableReRanking:
- type: boolean
- description: |
- 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.
- default: true
- x-categories:
- - Filtering
+ $ref: '../../../common/schemas/IndexSettings.yml#/enableReRanking'
enableRules:
- type: boolean
- description: Whether to enable rules.
- default: true
- x-categories:
- - Rules
+ $ref: '../../../common/schemas/IndexSettings.yml#/enableRules'
exactOnSingleWordQuery:
$ref: '../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery'
facets:
- type: array
- items:
- type: string
- description: |
- 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).
- default: []
- example: ['*']
- x-categories:
- - Faceting
+ $ref: '../../../common/schemas/SearchParams.yml#/facets'
facetFilters:
$ref: '../../../common/schemas/SearchParams.yml#/facetFilters'
facetingAfterDistinct:
- type: boolean
- description: |
- 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`.
- default: false
- x-categories:
- - Faceting
+ $ref: '../../../common/schemas/SearchParams.yml#/facetingAfterDistinct'
filters:
$ref: '../../../common/schemas/SearchParams.yml#/filters'
getRankingInfo:
- type: boolean
- description: Whether the search response should include detailed ranking information.
+ $ref: '../../../common/schemas/SearchParams.yml#/getRankingInfo'
highlightPreTag:
- type: string
- description: HTML tag to insert before the highlighted parts in all highlighted results and snippets.
- default:
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/highlightPreTag'
highlightPostTag:
- type: string
- description: HTML tag to insert after the highlighted parts in all highlighted results and snippets.
- default:
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/highlightPostTag'
hitsPerPage:
$ref: '../../../common/schemas/IndexSettings.yml#/hitsPerPage'
@@ -305,93 +107,34 @@ query:
$ref: '../../../common/schemas/SearchParams.yml#/query'
queryLanguages:
- type: array
- items:
- $ref: '../../../common/schemas/IndexSettings.yml#/supportedLanguage'
- example:
- - es
- description: |
- 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/).
- default: []
- x-categories:
- - Languages
+ $ref: '../../../common/schemas/IndexSettings.yml#/queryLanguages'
queryType:
$ref: '../../../common/schemas/IndexSettings.yml#/queryType'
length:
- type: integer
- description: Number of hits to retrieve (used in combination with `offset`).
- minimum: 0
- maximum: 1000
- x-categories:
- - Pagination
+ $ref: '../../../common/schemas/SearchParams.yml#/length'
maxFacetHits:
$ref: '../../../common/schemas/IndexSettings.yml#/maxFacetHits'
maxValuesPerFacet:
- type: integer
- description: Maximum number of facet values to return for each facet.
- default: 100
- maximum: 1000
- x-categories:
- - Faceting
+ $ref: '../../../common/schemas/IndexSettings.yml#/maxValuesPerFacet'
minimumAroundRadius:
- type: integer
- description: Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
- minimum: 1
- x-categories:
- - Geo-Search
+ $ref: '../../../common/schemas/SearchParams.yml#/minimumAroundRadius'
minProximity:
- type: integer
- minimum: 1
- maximum: 7
- description: |
- 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.
- default: 1
- x-categories:
- - Advanced
+ $ref: '../../../common/schemas/IndexSettings.yml#/minProximity'
minWordSizefor1Typo:
- type: integer
- description: 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).
- default: 4
- x-categories:
- - Typos
+ $ref: '../../../common/schemas/IndexSettings.yml#/minWordSizefor1Typo'
minWordSizefor2Typos:
- type: integer
- description: 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).
- default: 8
- x-categories:
- - Typos
+ $ref: '../../../common/schemas/IndexSettings.yml#/minWordSizefor2Typos'
naturalLanguages:
- type: array
- items:
- $ref: '../../../common/schemas/IndexSettings.yml#/supportedLanguage'
- description: |
- 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`.
- default: []
- x-categories:
- - Languages
+ $ref: '../../../common/schemas/SearchParams.yml#/naturalLanguages'
numericFilters:
$ref: '../../../common/schemas/SearchParams.yml#/numericFilters'
@@ -400,54 +143,19 @@ optionalFilters:
$ref: '../../../common/schemas/SearchParams.yml#/optionalFilters'
optionalWords:
- type: array
- items:
- type: string
- example:
- - blue
- - iphone case
- description: |
- Words that should be considered optional when found in the query
- By default, records must match all words in the search query to be included in the search results.
- Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.
- For example, if the search query is "action video" and "video" is an optional word,
- the search engine runs two queries. One for "action video" and one for "action".
- Records that match all words are ranked higher
- For a search query with 4 or more words **and** all its words are optional,
- the number of matched words required for a record to be included in the search results increases for every 1,000 records
- - If `optionalWords` has less than 10 words, the required number of matched words increases by 1:
- results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.
- - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down).
- For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words
- For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
- default: []
- x-categories:
- - Query strategy
+ $ref: '../../../common/schemas/IndexSettings.yml#/optionalWords'
page:
$ref: '../../../common/schemas/SearchParams.yml#/page'
percentileComputation:
- type: boolean
- description: Whether to include this search when calculating processing-time percentiles.
- default: true
- x-categories:
- - Advanced
+ $ref: '../../../common/schemas/SearchParams.yml#/percentileComputation'
personalizationImpact:
- type: integer
- description: |
- 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).
- default: 100
- minimum: 0
- maximum: 100
- x-categories:
- - Personalization
+ $ref: '../../../common/schemas/SearchParams.yml#/personalizationImpact'
relevancyStrictness:
- type: integer
+ $ref: '../../../common/schemas/IndexSettings.yml#/relevancyStrictness'
removeStopWords:
$ref: '../../../common/schemas/IndexSettings.yml#/removeStopWords'
@@ -456,107 +164,31 @@ removeWordsIfNoResults:
$ref: '../../../common/schemas/IndexSettings.yml#/removeWordsIfNoResults'
replaceSynonymsInHighlight:
- type: boolean
- description: |
- Whether to replace a highlighted word with the matched synonym
- By default, the original words are highlighted even if a synonym matches.
- For example, with `home` as a synonym for `house` and a search for `home`,
- records matching either "home" or "house" are included in the search results,
- and either "home" or "house" are highlighted
- With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,
- but all occurrences of "house" are replaced by "home" in the highlighted response.
- default: false
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/replaceSynonymsInHighlight'
responseFields:
- type: array
- items:
- type: string
- description: |
- 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.
- default: ['*']
- x-categories:
- - Advanced
+ $ref: '../../../common/schemas/IndexSettings.yml#/responseFields'
restrictSearchableAttributes:
- type: array
- items:
- type: string
- example: [title, author]
- description: |
- Restricts a search to a subset of your searchable attributes.
- Attribute names are case-sensitive.
- default: []
- x-categories:
- - Filtering
+ $ref: '../../../common/schemas/SearchParams.yml#/restrictSearchableAttributes'
restrictHighlightAndSnippetArrays:
- type: boolean
- description: |
- Whether to restrict highlighting and snippeting to items that at least partially matched the search query.
- By default, all items are highlighted and snippeted.
- default: false
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/restrictHighlightAndSnippetArrays'
ruleContexts:
- type: array
- items:
- type: string
- description: |
- 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.
- default: []
- example: [mobile]
- x-categories:
- - Rules
+ $ref: '../../../common/schemas/SearchParams.yml#/ruleContexts'
sortFacetValuesBy:
- type: string
- description: |
- 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/).
- default: count
- x-categories:
- - Faceting
+ $ref: '../../../common/schemas/IndexSettings.yml#/sortFacetValuesBy'
snippetEllipsisText:
- type: string
- description: String used as an ellipsis indicator when a snippet is truncated.
- default: …
- x-categories:
- - Highlighting and Snippeting
+ $ref: '../../../common/schemas/IndexSettings.yml#/snippetEllipsisText'
sumOrFiltersScores:
- type: boolean
- description: |
- 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).
- default: false
- x-categories:
- - Filtering
+ $ref: '../../../common/schemas/SearchParams.yml#/sumOrFiltersScores'
synonyms:
- type: boolean
- description: Whether to take into account an index's synonyms for this search.
- default: true
- x-categories:
- - Advanced
+ $ref: '../../../common/schemas/SearchParams.yml#/synonyms'
userToken:
$ref: '../../../common/schemas/SearchParams.yml#/userToken'
From 4160f9a2d89a45cd207f9477f135a46a22460105 Mon Sep 17 00:00:00 2001
From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
Date: Wed, 23 Jul 2025 12:30:57 +0200
Subject: [PATCH 2/8] fix: move forgotten `x-categories`
---
specs/common/schemas/IndexSettings.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml
index a66eb7e49bc..51e2290bbec 100644
--- a/specs/common/schemas/IndexSettings.yml
+++ b/specs/common/schemas/IndexSettings.yml
@@ -415,8 +415,6 @@ indexSettingsAsSearchParams:
$ref: '#/semanticSearch'
advancedSyntax:
$ref: '#/advancedSyntax'
- x-categories:
- - Query strategy
optionalWords:
$ref: '#/optionalWords'
disableExactOnAttributes:
@@ -460,6 +458,8 @@ advancedSyntax:
Whether to support phrase matching and excluding words from search queries
Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
default: false
+ x-categories:
+ - Query strategy
advancedSyntaxFeatures:
type: array
From a0ee0c70ba678ac8856048523a4885c386e8f189 Mon Sep 17 00:00:00 2001
From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
Date: Wed, 23 Jul 2025 12:45:34 +0200
Subject: [PATCH 3/8] fix: bad ref for `Analytics`
---
specs/common/schemas/SearchParams.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml
index d4fe968f36d..bc680693e0d 100644
--- a/specs/common/schemas/SearchParams.yml
+++ b/specs/common/schemas/SearchParams.yml
@@ -84,7 +84,7 @@ baseSearchParamsWithoutQuery:
clickAnalytics:
$ref: '#/clickAnalytics'
analytics:
- $ref: '#/analyticsTags'
+ $ref: '#/analytics'
analyticsTags:
$ref: '#/analyticsTags'
x-categories:
From bee01791f3ebf945beda03e31565339414e9253e Mon Sep 17 00:00:00 2001
From: shortcuts
Date: Wed, 23 Jul 2025 13:25:43 +0200
Subject: [PATCH 4/8] chore: facet order naming
---
specs/common/schemas/IndexSettings.yml | 6 +++---
specs/common/schemas/SearchParams.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml
index 51e2290bbec..4f494724321 100644
--- a/specs/common/schemas/IndexSettings.yml
+++ b/specs/common/schemas/IndexSettings.yml
@@ -979,7 +979,7 @@ facetOrdering:
additionalProperties: false
properties:
facets:
- $ref: '#/facets'
+ $ref: '#/facetsWithOrder'
values:
$ref: '#/values'
@@ -1035,7 +1035,7 @@ bannerImageUrl:
url:
type: string
-facets:
+facetsWithOrder:
description: Order of facet names.
type: object
additionalProperties: false
@@ -1298,4 +1298,4 @@ snippetEllipsisText:
description: String used as an ellipsis indicator when a snippet is truncated.
default: …
x-categories:
- - Highlighting and Snippeting
\ No newline at end of file
+ - Highlighting and Snippeting
diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml
index bc680693e0d..2f2b15a9f42 100644
--- a/specs/common/schemas/SearchParams.yml
+++ b/specs/common/schemas/SearchParams.yml
@@ -539,4 +539,4 @@ userToken:
For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
example: test-user-123
x-categories:
- - Personalization
\ No newline at end of file
+ - Personalization
From 06abc4350a179430e325bb2a561483265b8c4814 Mon Sep 17 00:00:00 2001
From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
Date: Wed, 23 Jul 2025 15:39:20 +0200
Subject: [PATCH 5/8] fix: fix typos
---
specs/common/schemas/IndexSettings.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml
index 4f494724321..c91458b813f 100644
--- a/specs/common/schemas/IndexSettings.yml
+++ b/specs/common/schemas/IndexSettings.yml
@@ -523,7 +523,7 @@ alternativesAsExactEnum:
attributeCriteriaComputedByMinProximity:
type: boolean
description: |
- Whether the best matching attribute should be determined by minimum proximit
+ 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.
@@ -751,10 +751,10 @@ queryLanguages:
example:
- es
description: |
- Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionarie
+ 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*
+ 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.
From ecbcfb4f99df54a8a53ede3aa5b9570faf6ffcca Mon Sep 17 00:00:00 2001
From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
Date: Wed, 23 Jul 2025 16:19:56 +0200
Subject: [PATCH 6/8] fix: enum proposal
---
specs/common/schemas/IndexSettings.yml | 29 +++-----------------------
specs/common/schemas/SearchEnums.yml | 22 +++++++++++++++++++
2 files changed, 25 insertions(+), 26 deletions(-)
create mode 100644 specs/common/schemas/SearchEnums.yml
diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml
index c91458b813f..9c39bc13ec0 100644
--- a/specs/common/schemas/IndexSettings.yml
+++ b/specs/common/schemas/IndexSettings.yml
@@ -464,7 +464,7 @@ advancedSyntax:
advancedSyntaxFeatures:
type: array
items:
- $ref: '#/advancedSyntaxFeaturesEnum'
+ $ref: './SearchEnums.yml#/advancedSyntaxFeatures'
description: |
Advanced search syntax features you want to support
- `exactPhrase`.
@@ -478,12 +478,6 @@ advancedSyntaxFeatures:
x-categories:
- Query strategy
-advancedSyntaxFeaturesEnum:
- type: string
- enum: [exactPhrase, excludeWords]
- x-categories:
- - Query strategy
-
allowTyposOnNumericTokens:
type: boolean
description: |
@@ -497,7 +491,7 @@ allowTyposOnNumericTokens:
alternativesAsExact:
type: array
items:
- $ref: '#/alternativesAsExactEnum'
+ $ref: './SearchEnums.yml#/alternativesAsExact'
description: |
Determine which plurals and synonyms should be considered an exact matches
By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.
@@ -514,12 +508,6 @@ alternativesAsExact:
x-categories:
- Query strategy
-alternativesAsExactEnum:
- type: string
- enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym, ignoreConjugations]
- x-categories:
- - Query strategy
-
attributeCriteriaComputedByMinProximity:
type: boolean
description: |
@@ -889,21 +877,10 @@ typoTolerance:
- type: boolean
default: true
description: Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches.
- - $ref: '#/typoToleranceEnum'
+ - $ref: './SearchEnums.yml#/typoTolerance'
x-categories:
- Typos
-typoToleranceEnum:
- type: string
- title: typo tolerance
- description: |
- - `min`. Return matches with the lowest number of typos.
- For example, if you have matches without typos, only include those.
- But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
- - `strict`. Return matches with the two lowest numbers of typos.
- With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
- enum: [min, strict, 'true', 'false']
-
ignorePlurals:
description: |
Treat singular, plurals, and other forms of declensions as equivalent.
diff --git a/specs/common/schemas/SearchEnums.yml b/specs/common/schemas/SearchEnums.yml
new file mode 100644
index 00000000000..d137c96138a
--- /dev/null
+++ b/specs/common/schemas/SearchEnums.yml
@@ -0,0 +1,22 @@
+advancedSyntaxFeatures:
+ type: string
+ enum: [exactPhrase, excludeWords]
+ x-categories:
+ - Query strategy
+
+alternativesAsExact:
+ type: string
+ enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym, ignoreConjugations]
+ x-categories:
+ - Query strategy
+
+typoTolerance:
+ type: string
+ title: typo tolerance
+ description: |
+ - `min`. Return matches with the lowest number of typos.
+ For example, if you have matches without typos, only include those.
+ But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
+ - `strict`. Return matches with the two lowest numbers of typos.
+ With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
+ enum: [min, strict, 'true', 'false']
\ No newline at end of file
From 93b68b4676dd500bc7d5ae805b7789706b29508e Mon Sep 17 00:00:00 2001
From: Gavin Wade
Date: Tue, 5 Aug 2025 10:44:30 -0400
Subject: [PATCH 7/8] fix: types
---
specs/common/schemas/IndexSettings.yml | 6 ++---
specs/common/schemas/SearchEnums.yml | 4 +--
specs/common/schemas/SearchParams.yml | 25 ++++++++-----------
.../composition-full/common/params/Search.yml | 2 +-
4 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml
index 9c39bc13ec0..5601126cef4 100644
--- a/specs/common/schemas/IndexSettings.yml
+++ b/specs/common/schemas/IndexSettings.yml
@@ -877,7 +877,7 @@ typoTolerance:
- type: boolean
default: true
description: Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches.
- - $ref: './SearchEnums.yml#/typoTolerance'
+ - $ref: './SearchEnums.yml#/typoToleranceEnum'
x-categories:
- Typos
@@ -956,7 +956,7 @@ facetOrdering:
additionalProperties: false
properties:
facets:
- $ref: '#/facetsWithOrder'
+ $ref: '#/facets'
values:
$ref: '#/values'
@@ -1012,7 +1012,7 @@ bannerImageUrl:
url:
type: string
-facetsWithOrder:
+facets:
description: Order of facet names.
type: object
additionalProperties: false
diff --git a/specs/common/schemas/SearchEnums.yml b/specs/common/schemas/SearchEnums.yml
index d137c96138a..ad5211c7c42 100644
--- a/specs/common/schemas/SearchEnums.yml
+++ b/specs/common/schemas/SearchEnums.yml
@@ -10,7 +10,7 @@ alternativesAsExact:
x-categories:
- Query strategy
-typoTolerance:
+typoToleranceEnum:
type: string
title: typo tolerance
description: |
@@ -19,4 +19,4 @@ typoTolerance:
But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
- `strict`. Return matches with the two lowest numbers of typos.
With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
- enum: [min, strict, 'true', 'false']
\ No newline at end of file
+ enum: [min, strict, 'true', 'false']
diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml
index 2f2b15a9f42..c539e80ec7a 100644
--- a/specs/common/schemas/SearchParams.yml
+++ b/specs/common/schemas/SearchParams.yml
@@ -43,7 +43,17 @@ baseSearchParamsWithoutQuery:
restrictSearchableAttributes:
$ref: '#/restrictSearchableAttributes'
facets:
- $ref: '#/facets'
+ type: array
+ items:
+ type: string
+ description: |
+ 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).
+ default: []
+ example: ['*']
+ x-categories:
+ - Faceting
facetingAfterDistinct:
$ref: '#/facetingAfterDistinct'
page:
@@ -219,19 +229,6 @@ enableABTest:
x-categories:
- Advanced
-facets:
- type: array
- items:
- type: string
- description: |
- 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).
- default: []
- example: ['*']
- x-categories:
- - Faceting
-
facetFilters:
description: |
Filter the search by facet values, so that only records with the same facet values are retrieved.
diff --git a/specs/composition-full/common/params/Search.yml b/specs/composition-full/common/params/Search.yml
index 9da32f1d95a..eadfae62605 100644
--- a/specs/composition-full/common/params/Search.yml
+++ b/specs/composition-full/common/params/Search.yml
@@ -71,7 +71,7 @@ exactOnSingleWordQuery:
$ref: '../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery'
facets:
- $ref: '../../../common/schemas/SearchParams.yml#/facets'
+ $ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets'
facetFilters:
$ref: '../../../common/schemas/SearchParams.yml#/facetFilters'
From c004dd229458feaa0890b809b35f8aaed3ec1f40 Mon Sep 17 00:00:00 2001
From: Gavin Wade
Date: Fri, 8 Aug 2025 09:40:57 -0400
Subject: [PATCH 8/8] fix: replace Search.yml with references to the common
spec
---
.../composition-full/common/params/Search.yml | 197 ------------------
.../common/schemas/components/Injection.yml | 106 +++++-----
.../schemas/requestBodies/RunParams.yml | 44 ++--
3 files changed, 75 insertions(+), 272 deletions(-)
delete mode 100644 specs/composition-full/common/params/Search.yml
diff --git a/specs/composition-full/common/params/Search.yml b/specs/composition-full/common/params/Search.yml
deleted file mode 100644
index eadfae62605..00000000000
--- a/specs/composition-full/common/params/Search.yml
+++ /dev/null
@@ -1,197 +0,0 @@
-advancedSyntax:
- $ref: '../../../common/schemas/IndexSettings.yml#/advancedSyntax'
-
-advancedSyntaxFeatures:
- $ref: '../../../common/schemas/IndexSettings.yml#/advancedSyntaxFeatures'
-
-distinct:
- $ref: '../../../common/schemas/IndexSettings.yml#/distinct'
-
-allowTyposOnNumericTokens:
- $ref: '../../../common/schemas/IndexSettings.yml#/allowTyposOnNumericTokens'
-
-alternativesAsExact:
- $ref: '../../../common/schemas/IndexSettings.yml#/alternativesAsExact'
-
-analytics:
- $ref: '../../../common/schemas/SearchParams.yml#/analytics'
-
-analyticsTags:
- $ref: '../../../common/schemas/SearchParams.yml#/analyticsTags'
-
-aroundLatLng:
- $ref: '../../../common/schemas/SearchParams.yml#/aroundLatLng'
-
-aroundLatLngViaIP:
- $ref: '../../../common/schemas/SearchParams.yml#/aroundLatLngViaIP'
-
-aroundPrecision:
- $ref: '../../../common/schemas/SearchParams.yml#/aroundPrecision'
-
-aroundRadius:
- $ref: '../../../common/schemas/SearchParams.yml#/aroundRadius'
-
-attributeCriteriaComputedByMinProximity:
- $ref: '../../../common/schemas/IndexSettings.yml#/attributeCriteriaComputedByMinProximity'
-
-attributesToHighlight:
- $ref: '../../../common/schemas/IndexSettings.yml#/attributesToHighlight'
-
-attributesToSnippet:
- $ref: '../../../common/schemas/IndexSettings.yml#/attributesToSnippet'
-
-attributesToRetrieve:
- $ref: '../../../common/schemas/IndexSettings.yml#/attributesToRetrieve'
-
-clickAnalytics:
- $ref: '../../../common/schemas/SearchParams.yml#/clickAnalytics'
-
-disableExactOnAttributes:
- $ref: '../../../common/schemas/IndexSettings.yml#/disableExactOnAttributes'
-
-decompoundQuery:
- $ref: '../../../common/schemas/IndexSettings.yml#/decompoundQuery'
-
-disableTypoToleranceOnAttributes:
- $ref: '../../../common/schemas/IndexSettings.yml#/disableTypoToleranceOnAttributes'
-
-enableABTest:
- $ref: '../../../common/schemas/SearchParams.yml#/enableABTest'
-
-enablePersonalization:
- $ref: '../../../common/schemas/IndexSettings.yml#/enablePersonalization'
-
-enableReRanking:
- $ref: '../../../common/schemas/IndexSettings.yml#/enableReRanking'
-
-enableRules:
- $ref: '../../../common/schemas/IndexSettings.yml#/enableRules'
-
-exactOnSingleWordQuery:
- $ref: '../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery'
-
-facets:
- $ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets'
-
-facetFilters:
- $ref: '../../../common/schemas/SearchParams.yml#/facetFilters'
-
-facetingAfterDistinct:
- $ref: '../../../common/schemas/SearchParams.yml#/facetingAfterDistinct'
-
-filters:
- $ref: '../../../common/schemas/SearchParams.yml#/filters'
-
-getRankingInfo:
- $ref: '../../../common/schemas/SearchParams.yml#/getRankingInfo'
-
-highlightPreTag:
- $ref: '../../../common/schemas/IndexSettings.yml#/highlightPreTag'
-
-highlightPostTag:
- $ref: '../../../common/schemas/IndexSettings.yml#/highlightPostTag'
-
-hitsPerPage:
- $ref: '../../../common/schemas/IndexSettings.yml#/hitsPerPage'
-
-ignorePlurals:
- $ref: '../../../common/schemas/IndexSettings.yml#/ignorePlurals'
-
-insideBoundingBox:
- $ref: '../../../common/schemas/SearchParams.yml#/insideBoundingBox'
-
-insidePolygon:
- $ref: '../../../common/schemas/SearchParams.yml#/insidePolygon'
-
-query:
- $ref: '../../../common/schemas/SearchParams.yml#/query'
-
-queryLanguages:
- $ref: '../../../common/schemas/IndexSettings.yml#/queryLanguages'
-
-queryType:
- $ref: '../../../common/schemas/IndexSettings.yml#/queryType'
-
-length:
- $ref: '../../../common/schemas/SearchParams.yml#/length'
-
-maxFacetHits:
- $ref: '../../../common/schemas/IndexSettings.yml#/maxFacetHits'
-
-maxValuesPerFacet:
- $ref: '../../../common/schemas/IndexSettings.yml#/maxValuesPerFacet'
-
-minimumAroundRadius:
- $ref: '../../../common/schemas/SearchParams.yml#/minimumAroundRadius'
-
-minProximity:
- $ref: '../../../common/schemas/IndexSettings.yml#/minProximity'
-
-minWordSizefor1Typo:
- $ref: '../../../common/schemas/IndexSettings.yml#/minWordSizefor1Typo'
-
-minWordSizefor2Typos:
- $ref: '../../../common/schemas/IndexSettings.yml#/minWordSizefor2Typos'
-
-naturalLanguages:
- $ref: '../../../common/schemas/SearchParams.yml#/naturalLanguages'
-
-numericFilters:
- $ref: '../../../common/schemas/SearchParams.yml#/numericFilters'
-
-optionalFilters:
- $ref: '../../../common/schemas/SearchParams.yml#/optionalFilters'
-
-optionalWords:
- $ref: '../../../common/schemas/IndexSettings.yml#/optionalWords'
-
-page:
- $ref: '../../../common/schemas/SearchParams.yml#/page'
-
-percentileComputation:
- $ref: '../../../common/schemas/SearchParams.yml#/percentileComputation'
-
-personalizationImpact:
- $ref: '../../../common/schemas/SearchParams.yml#/personalizationImpact'
-
-relevancyStrictness:
- $ref: '../../../common/schemas/IndexSettings.yml#/relevancyStrictness'
-
-removeStopWords:
- $ref: '../../../common/schemas/IndexSettings.yml#/removeStopWords'
-
-removeWordsIfNoResults:
- $ref: '../../../common/schemas/IndexSettings.yml#/removeWordsIfNoResults'
-
-replaceSynonymsInHighlight:
- $ref: '../../../common/schemas/IndexSettings.yml#/replaceSynonymsInHighlight'
-
-responseFields:
- $ref: '../../../common/schemas/IndexSettings.yml#/responseFields'
-
-restrictSearchableAttributes:
- $ref: '../../../common/schemas/SearchParams.yml#/restrictSearchableAttributes'
-
-restrictHighlightAndSnippetArrays:
- $ref: '../../../common/schemas/IndexSettings.yml#/restrictHighlightAndSnippetArrays'
-
-ruleContexts:
- $ref: '../../../common/schemas/SearchParams.yml#/ruleContexts'
-
-sortFacetValuesBy:
- $ref: '../../../common/schemas/IndexSettings.yml#/sortFacetValuesBy'
-
-snippetEllipsisText:
- $ref: '../../../common/schemas/IndexSettings.yml#/snippetEllipsisText'
-
-sumOrFiltersScores:
- $ref: '../../../common/schemas/SearchParams.yml#/sumOrFiltersScores'
-
-synonyms:
- $ref: '../../../common/schemas/SearchParams.yml#/synonyms'
-
-userToken:
- $ref: '../../../common/schemas/SearchParams.yml#/userToken'
-
-typoTolerance:
- $ref: '../../../common/schemas/IndexSettings.yml#/typoTolerance'
diff --git a/specs/composition-full/common/schemas/components/Injection.yml b/specs/composition-full/common/schemas/components/Injection.yml
index fd3d63d5f41..99963d9a092 100644
--- a/specs/composition-full/common/schemas/components/Injection.yml
+++ b/specs/composition-full/common/schemas/components/Injection.yml
@@ -4,99 +4,99 @@ baseInjectionQueryParameters:
additionalProperties: false
properties:
advancedSyntax:
- $ref: '../../params/Search.yml#/advancedSyntax'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/advancedSyntax'
advancedSyntaxFeatures:
- $ref: '../../params/Search.yml#/advancedSyntaxFeatures'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/advancedSyntaxFeatures'
allowTyposOnNumericTokens:
- $ref: '../../params/Search.yml#/allowTyposOnNumericTokens'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/allowTyposOnNumericTokens'
alternativesAsExact:
- $ref: '../../params/Search.yml#/alternativesAsExact'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/alternativesAsExact'
analytics:
- $ref: '../../params/Search.yml#/analytics'
+ $ref: '../../../../common/schemas/SearchParams.yml#/analytics'
attributeCriteriaComputedByMinProximity:
- $ref: '../../params/Search.yml#/attributeCriteriaComputedByMinProximity'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/attributeCriteriaComputedByMinProximity'
attributesToHighlight:
- $ref: '../../params/Search.yml#/attributesToHighlight'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/attributesToHighlight'
attributesToRetrieve:
- $ref: '../../params/Search.yml#/attributesToRetrieve'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/attributesToRetrieve'
attributesToSnippet:
- $ref: '../../params/Search.yml#/attributesToSnippet'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/attributesToSnippet'
clickAnalytics:
- $ref: '../../params/Search.yml#/clickAnalytics'
+ $ref: '../../../../common/schemas/SearchParams.yml#/clickAnalytics'
decompoundQuery:
- $ref: '../../params/Search.yml#/decompoundQuery'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/decompoundQuery'
disableExactOnAttributes:
- $ref: '../../params/Search.yml#/disableExactOnAttributes'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/disableExactOnAttributes'
disableTypoToleranceOnAttributes:
- $ref: '../../params/Search.yml#/disableTypoToleranceOnAttributes'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/disableTypoToleranceOnAttributes'
distinct:
- $ref: '../../params/Search.yml#/distinct'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/distinct'
enableABTest:
- $ref: '../../params/Search.yml#/enableABTest'
+ $ref: '../../../../common/schemas/SearchParams.yml#/enableABTest'
enablePersonalization:
- $ref: '../../params/Search.yml#/enablePersonalization'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/enablePersonalization'
enableReRanking:
- $ref: '../../params/Search.yml#/enableReRanking'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/enableReRanking'
enableRules:
- $ref: '../../params/Search.yml#/enableRules'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/enableRules'
exactOnSingleWordQuery:
- $ref: '../../params/Search.yml#/exactOnSingleWordQuery'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery'
facetFilters:
- $ref: '../../params/Search.yml#/facetFilters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/facetFilters'
filters:
- $ref: '../../params/Search.yml#/filters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/filters'
getRankingInfo:
- $ref: '../../params/Search.yml#/getRankingInfo'
+ $ref: '../../../../common/schemas/SearchParams.yml#/getRankingInfo'
highlightPostTag:
- $ref: '../../params/Search.yml#/highlightPostTag'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/highlightPostTag'
highlightPreTag:
- $ref: '../../params/Search.yml#/highlightPreTag'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/highlightPreTag'
ignorePlurals:
- $ref: '../../params/Search.yml#/ignorePlurals'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/ignorePlurals'
maxFacetHits:
- $ref: '../../params/Search.yml#/maxFacetHits'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/maxFacetHits'
minProximity:
- $ref: '../../params/Search.yml#/minProximity'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/minProximity'
minWordSizefor1Typo:
- $ref: '../../params/Search.yml#/minWordSizefor1Typo'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/minWordSizefor1Typo'
minWordSizefor2Typos:
- $ref: '../../params/Search.yml#/minWordSizefor2Typos'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/minWordSizefor2Typos'
naturalLanguages:
- $ref: '../../params/Search.yml#/naturalLanguages'
+ $ref: '../../../../common/schemas/SearchParams.yml#/naturalLanguages'
numericFilters:
- $ref: '../../params/Search.yml#/numericFilters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/numericFilters'
optionalFilters:
- $ref: '../../params/Search.yml#/optionalFilters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/optionalFilters'
optionalWords:
- $ref: '../../params/Search.yml#/optionalWords'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/optionalWords'
percentileComputation:
- $ref: '../../params/Search.yml#/percentileComputation'
+ $ref: '../../../../common/schemas/SearchParams.yml#/percentileComputation'
personalizationImpact:
- $ref: '../../params/Search.yml#/personalizationImpact'
+ $ref: '../../../../common/schemas/SearchParams.yml#/personalizationImpact'
queryLanguages:
- $ref: '../../params/Search.yml#/queryLanguages'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/queryLanguages'
queryType:
- $ref: '../../params/Search.yml#/queryType'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/queryType'
removeStopWords:
- $ref: '../../params/Search.yml#/removeStopWords'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/removeStopWords'
removeWordsIfNoResults:
- $ref: '../../params/Search.yml#/removeWordsIfNoResults'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/removeWordsIfNoResults'
replaceSynonymsInHighlight:
- $ref: '../../params/Search.yml#/replaceSynonymsInHighlight'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/replaceSynonymsInHighlight'
responseFields:
- $ref: '../../params/Search.yml#/responseFields'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/responseFields'
restrictHighlightAndSnippetArrays:
- $ref: '../../params/Search.yml#/restrictHighlightAndSnippetArrays'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/restrictHighlightAndSnippetArrays'
restrictSearchableAttributes:
- $ref: '../../params/Search.yml#/restrictSearchableAttributes'
+ $ref: '../../../../common/schemas/SearchParams.yml#/restrictSearchableAttributes'
ruleContexts:
- $ref: '../../params/Search.yml#/ruleContexts'
+ $ref: '../../../../common/schemas/SearchParams.yml#/ruleContexts'
snippetEllipsisText:
- $ref: '../../params/Search.yml#/snippetEllipsisText'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/snippetEllipsisText'
synonyms:
- $ref: '../../params/Search.yml#/synonyms'
+ $ref: '../../../../common/schemas/SearchParams.yml#/synonyms'
typoTolerance:
- $ref: '../../params/Search.yml#/typoTolerance'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/typoTolerance'
mainInjectionQueryParameters:
title: Composition Main Injection Query parameters as object
@@ -108,17 +108,17 @@ mainInjectionQueryParameters:
additionalProperties: false
properties:
facetingAfterDistinct:
- $ref: '../../params/Search.yml#/facetingAfterDistinct'
+ $ref: '../../../../common/schemas/SearchParams.yml#/facetingAfterDistinct'
facets:
- $ref: '../../params/Search.yml#/facets'
+ $ref: '../../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets'
hitsPerPage:
- $ref: '../../params/Search.yml#/hitsPerPage'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/hitsPerPage'
maxValuesPerFacet:
- $ref: '../../params/Search.yml#/maxValuesPerFacet'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/maxValuesPerFacet'
sortFacetValuesBy:
- $ref: '../../params/Search.yml#/sortFacetValuesBy'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/sortFacetValuesBy'
sumOrFiltersScores:
- $ref: '../../params/Search.yml#/sumOrFiltersScores'
+ $ref: '../../../../common/schemas/SearchParams.yml#/sumOrFiltersScores'
injectedItemsQueryParameters:
title: Composition injectedItems Query parameters as object
diff --git a/specs/composition-full/common/schemas/requestBodies/RunParams.yml b/specs/composition-full/common/schemas/requestBodies/RunParams.yml
index bdf7fb4a8ad..7955cd517ef 100644
--- a/specs/composition-full/common/schemas/requestBodies/RunParams.yml
+++ b/specs/composition-full/common/schemas/requestBodies/RunParams.yml
@@ -4,54 +4,54 @@ params:
additionalProperties: false
properties:
query:
- $ref: '../../params/Search.yml#/query'
+ $ref: '../../../../common/schemas/SearchParams.yml#/query'
filters:
- $ref: '../../params/Search.yml#/filters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/filters'
page:
- $ref: '../../params/Search.yml#/page'
+ $ref: '../../../../common/schemas/SearchParams.yml#/page'
getRankingInfo:
$ref: '../../params/Composition.yml#/getRankingInfo'
relevancyStrictness:
- $ref: '../../params/Search.yml#/relevancyStrictness'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/relevancyStrictness'
facetFilters:
- $ref: '../../params/Search.yml#/facetFilters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/facetFilters'
optionalFilters:
- $ref: '../../params/Search.yml#/optionalFilters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/optionalFilters'
numericFilters:
- $ref: '../../params/Search.yml#/numericFilters'
+ $ref: '../../../../common/schemas/SearchParams.yml#/numericFilters'
hitsPerPage:
- $ref: '../../params/Search.yml#/hitsPerPage'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/hitsPerPage'
aroundLatLng:
- $ref: '../../params/Search.yml#/aroundLatLng'
+ $ref: '../../../../common/schemas/SearchParams.yml#/aroundLatLng'
aroundLatLngViaIP:
- $ref: '../../params/Search.yml#/aroundLatLngViaIP'
+ $ref: '../../../../common/schemas/SearchParams.yml#/aroundLatLngViaIP'
aroundRadius:
- $ref: '../../params/Search.yml#/aroundRadius'
+ $ref: '../../../../common/schemas/SearchParams.yml#/aroundRadius'
aroundPrecision:
- $ref: '../../params/Search.yml#/aroundPrecision'
+ $ref: '../../../../common/schemas/SearchParams.yml#/aroundPrecision'
minimumAroundRadius:
- $ref: '../../params/Search.yml#/minimumAroundRadius'
+ $ref: '../../../../common/schemas/SearchParams.yml#/minimumAroundRadius'
insideBoundingBox:
- $ref: '../../params/Search.yml#/insideBoundingBox'
+ $ref: '../../../../common/schemas/SearchParams.yml#/insideBoundingBox'
insidePolygon:
- $ref: '../../params/Search.yml#/insidePolygon'
+ $ref: '../../../../common/schemas/SearchParams.yml#/insidePolygon'
queryLanguages:
- $ref: '../../params/Search.yml#/queryLanguages'
+ $ref: '../../../../common/schemas/IndexSettings.yml#/queryLanguages'
naturalLanguages:
- $ref: '../../params/Search.yml#/naturalLanguages'
+ $ref: '../../../../common/schemas/SearchParams.yml#/naturalLanguages'
enableRules:
$ref: '../../params/Composition.yml#/enableRules'
ruleContexts:
$ref: '../../params/Composition.yml#/ruleContexts'
userToken:
- $ref: '../../params/Search.yml#/userToken'
+ $ref: '../../../../common/schemas/SearchParams.yml#/userToken'
clickAnalytics:
- $ref: '../../params/Search.yml#/clickAnalytics'
+ $ref: '../../../../common/schemas/SearchParams.yml#/clickAnalytics'
analytics:
- $ref: '../../params/Search.yml#/analytics'
+ $ref: '../../../../common/schemas/SearchParams.yml#/analytics'
analyticsTags:
- $ref: '../../params/Search.yml#/analyticsTags'
+ $ref: '../../../../common/schemas/SearchParams.yml#/analyticsTags'
enableABTest:
$ref: '../../params/Composition.yml#/enableABTest'
enableReRanking:
- $ref: '../../params/Search.yml#/enableReRanking'
\ No newline at end of file
+ $ref: '../../../../common/schemas/IndexSettings.yml#/enableReRanking'