{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/algolia/main/json-schema/algolia-recommendations-request-schema.json", "title": "recommendationsRequest", "x-generated": "2026-09-23", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/algolia-recommend-api-openapi.yml#/components/schemas/recommendationsRequest", "oneOf": [ { "$ref": "#/$defs/boughtTogetherQuery" }, { "$ref": "#/$defs/relatedQuery" }, { "$ref": "#/$defs/trendingItemsQuery" }, { "$ref": "#/$defs/trendingFacetsQuery" }, { "$ref": "#/$defs/lookingSimilarQuery" } ], "$defs": { "IndexSettings_advancedSyntaxFeatures": { "type": "array", "items": { "$ref": "#/$defs/advancedSyntaxFeatures" }, "description": "Advanced search syntax features you want to support\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\"\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\"\nThis setting only has an effect if `advancedSyntax` is true.\n", "default": [ "exactPhrase", "excludeWords" ], "x-categories": [ "Query strategy" ] }, "IndexSettings_alternativesAsExact": { "type": "array", "items": { "$ref": "#/$defs/alternativesAsExact" }, "description": "Determine which plurals and synonyms should be considered an exact matches\nBy 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.\nFor example\n- \"swimsuit\" and \"swimsuits\" are treated the same\n- \"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))\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n", "default": [ "ignorePlurals", "singleWordSynonym" ], "x-categories": [ "Query strategy" ] }, "IndexSettings_facets": { "description": "Order of facet names.", "type": "object", "additionalProperties": false, "properties": { "order": { "$ref": "#/$defs/order" } } }, "advancedSyntax": { "type": "boolean", "description": "Whether to support phrase matching and excluding words from search queries\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n", "default": false, "x-categories": [ "Query strategy" ] }, "advancedSyntaxFeatures": { "type": "string", "enum": [ "exactPhrase", "excludeWords" ], "x-categories": [ "Query strategy" ] }, "allowTyposOnNumericTokens": { "type": "boolean", "description": "Whether to allow typos on numbers in the search query\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n", "default": true, "x-categories": [ "Typos" ] }, "alternativesAsExact": { "type": "string", "enum": [ "ignorePlurals", "singleWordSynonym", "multiWordsSynonym", "ignoreConjugations" ], "x-categories": [ "Query strategy" ] }, "analytics": { "type": "boolean", "description": "Whether this search will be included in Analytics.", "default": true, "x-categories": [ "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": [] }, "aroundLatLng": { "type": "string", "description": "Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.\n\nOnly records included within a circle around this central location are included in the results.\nThe radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.\nThis parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.\n", "default": "", "x-categories": [ "Geo-Search" ] }, "aroundLatLngViaIP": { "type": "boolean", "description": "Whether to obtain the coordinates from the request's IP address.", "default": false, "x-categories": [ "Geo-Search" ] }, "aroundPrecision": { "description": "Precision of a coordinate-based search in meters to group results with similar distances.\n\nThe Geo ranking criterion considers all matches within the same range of distances to be equal.\n", "oneOf": [ { "type": "integer", "default": 10, "description": "Distance in meters to group results by similar distances.\n\nFor example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance,\nas are records between 100 and 199 meters.\n" }, { "$ref": "#/$defs/aroundPrecisionFromValue" } ], "x-categories": [ "Geo-Search" ] }, "aroundPrecisionFromValue": { "title": "range objects", "type": "array", "items": { "title": "range", "type": "object", "description": "Range object with lower and upper values in meters to define custom ranges.", "properties": { "from": { "type": "integer", "description": "Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal." }, "value": { "type": "integer", "description": "Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal." } } } }, "aroundRadius": { "description": "Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n", "oneOf": [ { "type": "integer", "minimum": 1, "description": "Maximum search radius around a central location in meters." }, { "$ref": "#/$defs/aroundRadiusAll" } ], "x-categories": [ "Geo-Search" ] }, "aroundRadiusAll": { "title": "all", "type": "string", "description": "Return all records with a valid `_geoloc` attribute. Don't filter by distance.", "enum": [ "all" ] }, "attributeCriteriaComputedByMinProximity": { "type": "boolean", "description": "Whether the best matching attribute should be determined by minimum proximity\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n", "default": false, "x-categories": [ "Advanced" ] }, "attributesToHighlight": { "type": "array", "items": { "type": "string" }, "description": "Attributes to highlight\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).\n", "x-categories": [ "Highlighting and Snippeting" ] }, "attributesToRetrieve": { "type": "array", "items": { "type": "string" }, "description": "Attributes to include in the API response\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n", "default": [ "*" ], "x-categories": [ "Attributes" ] }, "attributesToSnippet": { "type": "array", "items": { "type": "string" }, "description": "Attributes for which to enable snippets.\nAttribute names are case-sensitive\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n", "default": [], "x-categories": [ "Highlighting and Snippeting" ] }, "banner": { "description": "Banner with image and link to redirect users.", "type": "object", "additionalProperties": false, "properties": { "image": { "$ref": "#/$defs/bannerImage" }, "link": { "$ref": "#/$defs/bannerLink" } } }, "bannerImage": { "description": "Image to show inside a banner.", "type": "object", "additionalProperties": false, "properties": { "urls": { "type": "array", "items": { "$ref": "#/$defs/bannerImageUrl" } }, "title": { "type": "string" } } }, "bannerImageUrl": { "description": "URL for an image to show inside a banner.", "type": "object", "additionalProperties": false, "properties": { "url": { "type": "string" } } }, "bannerLink": { "description": "Link for a banner defined in the Merchandising Studio.", "type": "object", "additionalProperties": false, "properties": { "url": { "type": "string" } } }, "banners": { "description": "Banners defined in the Merchandising Studio for a given search.", "type": "array", "items": { "$ref": "#/$defs/banner" } }, "baseIndexSettings": { "type": "object", "additionalProperties": false, "properties": { "attributesForFaceting": { "type": "array", "items": { "type": "string" }, "description": "Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting).\n\nFacets are attributes that let you categorize search results.\nThey can be used for filtering search results.\nBy default, no attribute is used for faceting.\nAttribute names are case-sensitive.\n\n**Modifiers**\n\n- `filterOnly(\"ATTRIBUTE\")`.\n Allows the attribute to be used as a filter but doesn't evaluate the facet values.\n\n- `searchable(\"ATTRIBUTE\")`.\n Allows searching for facet values.\n\n- `afterDistinct(\"ATTRIBUTE\")`.\n Evaluates the facet count _after_ deduplication with `distinct`.\n This ensures accurate facet counts.\n You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.\n", "default": [], "x-categories": [ "Faceting" ] }, "replicas": { "type": "array", "items": { "type": "string" }, "description": "Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas).\n\nReplicas are copies of a primary index with the same records but different settings, synonyms, or rules.\nIf you want to offer a different ranking or sorting of your search results, you'll use replica indices.\nAll index operations on a primary index are automatically forwarded to its replicas.\nTo add a replica index, you must provide the complete set of replicas to this parameter.\nIf you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index.\n\n**Modifier**\n\n- `virtual(\"REPLICA\")`.\n Create a virtual replica,\n Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).\n", "default": [], "x-categories": [ "Ranking" ] }, "paginationLimitedTo": { "type": "integer", "description": "Maximum number of search results that can be obtained through pagination.\n\nHigher pagination limits might slow down your search.\nFor pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.\n", "default": 1000, "maximum": 20000 }, "unretrievableAttributes": { "type": "array", "items": { "type": "string" }, "description": "Attributes that can't be retrieved at query time.\n\nThis can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data),\nbut don't want to include it in the search results.\nAttribute names are case-sensitive.\n", "default": [], "x-categories": [ "Attributes" ] }, "disableTypoToleranceOnWords": { "type": "array", "items": { "type": "string" }, "description": "Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words).\nThis also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) for the specified words.\n", "default": [], "x-categories": [ "Typos" ] }, "attributesToTransliterate": { "description": "Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead).\n\nTransliteration supports searching in any of the Japanese writing systems.\nTo support transliteration, you must set the indexing language to Japanese.\nAttribute names are case-sensitive.\n", "type": "array", "items": { "type": "string" }, "x-categories": [ "Languages" ] }, "camelCaseAttributes": { "type": "array", "items": { "type": "string" }, "description": "Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.\nAttribute names are case-sensitive.\n", "default": [], "x-categories": [ "Languages" ] }, "decompoundedAttributes": { "type": "object", "description": "Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation) (decompounding).\nAttribute names are case-sensitive.\n\nCompound words are formed by combining two or more individual words,\nand are particularly prevalent in Germanic languages—for example, \"firefighter\".\nWith decompounding, the individual components are indexed separately.\n\nYou can specify different lists for different languages.\nDecompounding is supported for these languages:\nDutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", "default": {}, "x-categories": [ "Languages" ] }, "indexLanguages": { "type": "array", "items": { "$ref": "#/$defs/supportedLanguage" }, "description": "Languages for language-specific processing steps, such as word detection and dictionary settings.\n\n**Always specify an indexing language.**\nIf 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),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor 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).\n", "default": [], "x-categories": [ "Languages" ] }, "disablePrefixOnAttributes": { "type": "array", "items": { "type": "string" }, "description": "Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).\nAttribute names are case-sensitive.\n", "default": [], "x-categories": [ "Query strategy" ] }, "allowCompressionOfIntegerArray": { "type": "boolean", "description": "Whether arrays with exclusively non-negative integers should be compressed for better performance.\nIf true, the compressed arrays may be reordered.\n", "default": false, "x-categories": [ "Performance" ] }, "numericAttributesForFiltering": { "type": "array", "items": { "type": "string" }, "description": "Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).\nAttribute names are case-sensitive.\n\nBy default, all numeric attributes are available as numerical filters.\nFor faster indexing, reduce the number of numeric attributes.\n\nTo turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.\n\n**Modifier**\n\n- `equalOnly(\"ATTRIBUTE\")`.\n Support only filtering based on equality comparisons `=` and `!=`.\n", "default": [], "x-categories": [ "Performance" ] }, "separatorsToIndex": { "type": "string", "description": "Control which non-alphanumeric characters are indexed.\n\nBy default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`).\nTo include such characters, define them with `separatorsToIndex`.\n\nSeparators are all non-letter characters except spaces and currency characters, such as $€£¥.\n\nWith `separatorsToIndex`, Algolia treats separator characters as separate words.\nFor example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.\n", "default": "", "x-categories": [ "Typos" ] }, "searchableAttributes": { "type": "array", "items": { "type": "string" }, "description": "Attributes used for searching. Attribute names are case-sensitive.\n\nBy default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off.\nWith a non-empty list, Algolia only returns results with matches in the selected attributes.\nIn addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first.\nTo make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`.\nAttributes with the same priority are always unordered.\n\nFor more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes).\n\n**Modifier**\n\n- `unordered(\"ATTRIBUTE\")`.\n Ignore the position of a match within the attribute.\n\nWithout a modifier, matches at the beginning of an attribute rank higher than matches at the end.\n", "default": [], "x-categories": [ "Attributes" ] }, "userData": { "$ref": "#/$defs/userData" }, "customNormalization": { "description": "Characters and their normalized replacements.\nThis overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization).\n", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } }, "x-categories": [ "Languages" ] }, "attributeForDistinct": { "description": "Attribute that should be used to establish groups of results.\nAttribute names are case-sensitive.\n\nAll records with the same value for this attribute are considered a group.\nYou can combine `attributeForDistinct` with the `distinct` search parameter to control\nhow many items per group are included in the search results.\n\nIf you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting.\nThis applies faceting _after_ deduplication, which will result in accurate facet counts.\n", "type": "string" }, "maxFacetHits": { "$ref": "#/$defs/maxFacetHits" }, "keepDiacriticsOnCharacters": { "type": "string", "description": "Characters for which diacritics should be preserved.\n\nBy default, Algolia removes diacritics from letters.\nFor example, `é` becomes `e`. If this causes issues in your search,\nyou can specify characters that should keep their diacritics.\n", "default": "", "x-categories": [ "Languages" ] }, "customRanking": { "type": "array", "items": { "type": "string" }, "description": "Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking).\nAttribute names are case-sensitive.\n\nThe custom ranking attributes decide which items are shown first if the other ranking criteria are equal.\n\nRecords with missing values for your selected custom ranking attributes are always sorted last.\nBoolean attributes are sorted based on their alphabetical order.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nIf you use two or more custom ranking attributes,\n[reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision) of your first attributes,\nor the other attributes will never be applied.\n", "default": [], "x-categories": [ "Ranking" ] } } }, "baseRecommendIndexSettings": { "type": "object", "additionalProperties": false, "properties": { "attributesToRetrieve": { "$ref": "#/$defs/attributesToRetrieve" }, "relevancyStrictness": { "$ref": "#/$defs/relevancyStrictness" }, "attributesToHighlight": { "$ref": "#/$defs/attributesToHighlight" }, "attributesToSnippet": { "$ref": "#/$defs/attributesToSnippet" }, "highlightPreTag": { "$ref": "#/$defs/highlightPreTag" }, "highlightPostTag": { "$ref": "#/$defs/highlightPostTag" }, "snippetEllipsisText": { "$ref": "#/$defs/snippetEllipsisText" }, "restrictHighlightAndSnippetArrays": { "$ref": "#/$defs/restrictHighlightAndSnippetArrays" }, "minWordSizefor1Typo": { "$ref": "#/$defs/minWordSizefor1Typo" }, "minWordSizefor2Typos": { "$ref": "#/$defs/minWordSizefor2Typos" }, "typoTolerance": { "$ref": "#/$defs/typoTolerance" }, "allowTyposOnNumericTokens": { "$ref": "#/$defs/allowTyposOnNumericTokens" }, "disableTypoToleranceOnAttributes": { "$ref": "#/$defs/disableTypoToleranceOnAttributes" }, "ignorePlurals": { "$ref": "#/$defs/ignorePlurals" }, "removeStopWords": { "$ref": "#/$defs/removeStopWords" }, "queryLanguages": { "$ref": "#/$defs/queryLanguages" }, "decompoundQuery": { "$ref": "#/$defs/decompoundQuery" }, "enablePersonalization": { "$ref": "#/$defs/enablePersonalization" }, "queryType": { "$ref": "#/$defs/queryType" }, "removeWordsIfNoResults": { "$ref": "#/$defs/removeWordsIfNoResults" }, "advancedSyntax": { "$ref": "#/$defs/advancedSyntax" }, "optionalWords": { "$ref": "#/$defs/optionalWords" }, "disableExactOnAttributes": { "$ref": "#/$defs/disableExactOnAttributes" }, "exactOnSingleWordQuery": { "$ref": "#/$defs/exactOnSingleWordQuery" }, "alternativesAsExact": { "$ref": "#/$defs/IndexSettings_alternativesAsExact" }, "advancedSyntaxFeatures": { "$ref": "#/$defs/IndexSettings_advancedSyntaxFeatures" }, "distinct": { "$ref": "#/$defs/distinct" }, "replaceSynonymsInHighlight": { "$ref": "#/$defs/replaceSynonymsInHighlight" }, "minProximity": { "$ref": "#/$defs/minProximity" }, "responseFields": { "$ref": "#/$defs/responseFields" }, "maxValuesPerFacet": { "$ref": "#/$defs/maxValuesPerFacet" }, "sortFacetValuesBy": { "$ref": "#/$defs/sortFacetValuesBy" }, "attributeCriteriaComputedByMinProximity": { "$ref": "#/$defs/attributeCriteriaComputedByMinProximity" }, "renderingContent": { "$ref": "#/$defs/renderingContent" }, "enableReRanking": { "$ref": "#/$defs/enableReRanking" }, "reRankingApplyFilter": { "oneOf": [ { "$ref": "#/$defs/reRankingApplyFilter" }, { "type": "null" } ] } } }, "baseRecommendRequest": { "type": "object", "additionalProperties": false, "properties": { "indexName": { "$ref": "#/$defs/indexName" }, "threshold": { "type": "number", "format": "double", "minimum": 0, "maximum": 100, "description": "Minimum score a recommendation must have to be included in the response." }, "maxRecommendations": { "type": "integer", "minimum": 1, "maximum": 30, "default": 30, "description": "Maximum number of recommendations to retrieve.\nBy default, all recommendations are returned and no fallback request is made.\nDepending on the available recommendations and the other request parameters,\nthe actual number of recommendations may be lower than this value.\n" }, "queryParameters": { "$ref": "#/$defs/recommendSearchParams" } }, "required": [ "indexName", "threshold" ] }, "baseRecommendSearchParams": { "type": "object", "additionalProperties": false, "properties": { "similarQuery": { "$ref": "#/$defs/similarQuery" }, "filters": { "$ref": "#/$defs/filters" }, "optionalFilters": { "$ref": "#/$defs/optionalFilters" }, "numericFilters": { "$ref": "#/$defs/numericFilters" }, "tagFilters": { "$ref": "#/$defs/tagFilters" }, "sumOrFiltersScores": { "$ref": "#/$defs/sumOrFiltersScores" }, "restrictSearchableAttributes": { "$ref": "#/$defs/restrictSearchableAttributes" }, "facets": { "$ref": "#/$defs/facets" }, "facetingAfterDistinct": { "$ref": "#/$defs/facetingAfterDistinct" }, "aroundLatLng": { "$ref": "#/$defs/aroundLatLng" }, "aroundLatLngViaIP": { "$ref": "#/$defs/aroundLatLngViaIP" }, "aroundRadius": { "$ref": "#/$defs/aroundRadius" }, "aroundPrecision": { "$ref": "#/$defs/aroundPrecision" }, "minimumAroundRadius": { "$ref": "#/$defs/minimumAroundRadius" }, "insideBoundingBox": { "$ref": "#/$defs/insideBoundingBox" }, "insidePolygon": { "$ref": "#/$defs/insidePolygon" }, "naturalLanguages": { "$ref": "#/$defs/naturalLanguages" }, "ruleContexts": { "$ref": "#/$defs/ruleContexts" }, "personalizationImpact": { "$ref": "#/$defs/personalizationImpact" }, "userToken": { "$ref": "#/$defs/userToken" }, "getRankingInfo": { "$ref": "#/$defs/getRankingInfo" }, "synonyms": { "$ref": "#/$defs/synonyms" }, "clickAnalytics": { "$ref": "#/$defs/clickAnalytics" }, "analytics": { "$ref": "#/$defs/analytics" }, "analyticsTags": { "$ref": "#/$defs/analyticsTags" }, "percentileComputation": { "$ref": "#/$defs/percentileComputation" } } }, "booleanString": { "type": "string", "enum": [ "true", "false" ] }, "boughtTogetherQuery": { "title": "Frequently bought together", "allOf": [ { "$ref": "#/$defs/baseRecommendRequest" }, { "$ref": "#/$defs/frequentlyBoughtTogether" } ] }, "clickAnalytics": { "type": "boolean", "description": "Whether to include a `queryID` attribute in the response\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).\n", "default": false, "x-categories": [ "Analytics" ] }, "decompoundQuery": { "type": "boolean", "description": "Whether to split compound words in the query into their building blocks\nFor 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).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", "default": true, "x-categories": [ "Languages" ] }, "disableExactOnAttributes": { "type": "array", "items": { "type": "string" }, "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).\nAttribute names are case-sensitive\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n", "default": [], "x-categories": [ "Query strategy" ] }, "disableTypoToleranceOnAttributes": { "type": "array", "items": { "type": "string" }, "description": "Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance).\nAttribute names are case-sensitive\nReturning only exact matches can help when\n- [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).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n", "default": [], "x-categories": [ "Typos" ] }, "distinct": { "description": "Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n", "oneOf": [ { "type": "boolean", "description": "Whether deduplication is turned on. If true, only one member of a group is shown in the search results." }, { "type": "integer", "description": "Number of members of a group of records to include in the search results.\n\n- Don't use `distinct > 1` for records that might be [promoted by rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits).\n The number of hits won't be correct and faceting won't work as expected.\n- With `distinct > 1`, the `hitsPerPage` parameter controls the number of returned groups.\n For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned.\n Likewise, the `nbHits` response attribute contains the number of returned groups.\n", "minimum": 0, "maximum": 4, "default": 0 } ], "x-categories": [ "Advanced" ] }, "enablePersonalization": { "type": "boolean", "description": "Whether to enable Personalization.", "default": false, "x-categories": [ "Personalization" ] }, "enableReRanking": { "type": "boolean", "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking)\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", "default": true, "x-categories": [ "Filtering" ] }, "enableRules": { "type": "boolean", "description": "Whether to enable rules.", "default": true, "x-categories": [ "Rules" ] }, "exactOnSingleWordQuery": { "type": "string", "enum": [ "attribute", "none", "word" ], "description": "Determines how 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) is computed when the search query has only one word.\n\n- `attribute`.\n The Exact ranking criterion is 1 if the query word and attribute value are the same.\n For example, a search for \"road\" will match the value \"road\", but not \"road trip\".\n\n- `none`.\n The Exact ranking criterion is ignored on single-word searches.\n\n- `word`.\n The Exact ranking criterion is 1 if the query word is found in the attribute value.\n The query word must have at least 3 characters and must not be a stop word.\n Only exact matches will be highlighted,\n partial and prefix matches won't.\n", "default": "attribute", "x-categories": [ "Query strategy" ] }, "facetFilters": { "description": "Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n", "oneOf": [ { "type": "array", "items": { "$ref": "#/$defs/facetFilters" } }, { "type": "string" } ], "x-categories": [ "Filtering" ] }, "facetName": { "type": "string", "description": "Facet attribute. To be used in combination with `facetValue`.\nIf specified, only recommendations matching the facet filter will be returned.\n" }, "facetOrdering": { "description": "Order of facet names and facet values in your UI.", "type": "object", "additionalProperties": false, "properties": { "facets": { "$ref": "#/$defs/IndexSettings_facets" }, "values": { "$ref": "#/$defs/values" } } }, "facetValue": { "type": "string", "description": "Facet value. To be used in combination with `facetName`.\nIf specified, only recommendations matching the facet filter will be returned.\n" }, "facetingAfterDistinct": { "type": "boolean", "description": "Whether faceting should be applied after deduplication with `distinct`\nThis leads to accurate facet counts when using faceting in combination with `distinct`.\nIt's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting,\nas `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.\n", "default": false, "x-categories": [ "Faceting" ] }, "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\nTo retrieve all facets, use the wildcard character `*`.\nFor more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).\n", "default": [], "x-categories": [ "Faceting" ] }, "fallbackParams": { "title": "fallbackParameters", "description": "Search parameters to use for a fallback request if there aren't enough recommendations.", "allOf": [ { "$ref": "#/$defs/baseRecommendSearchParams" }, { "$ref": "#/$defs/searchParamsQuery" }, { "$ref": "#/$defs/recommendIndexSettings" }, { "type": "object", "properties": { "facetFilters": { "$ref": "#/$defs/facetFilters" } } } ] }, "fbtModel": { "type": "string", "description": "Frequently bought together model.\n\nThis model recommends items that have been purchased within 1 day with the item with the ID `objectID`.\n", "enum": [ "bought-together" ] }, "filters": { "type": "string", "description": "Filter expression to only include items that match the filter criteria in the response.\n\nYou can use these filter expressions:\n\n- **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.\n- **Ranges.** `: TO `, where `` and `` are the lower and upper limits of the range (inclusive).\n- **Facet filters.** `:`, where `` is a facet attribute (case-sensitive) and `` a facet value.\n- **Tag filters.** `_tags:` or just `` (case-sensitive).\n- **Boolean filters.** `: true | false`.\n\nYou can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:\n\n- You can only combine filters of the same type with `OR`.\n **Not supported:** `facet:value OR num > 3`.\n- You can't use `NOT` with combinations of filters.\n **Not supported:** `NOT(facet:value OR facet:value)`\n- You can't combine conjunctions (`AND`) with `OR`.\n **Not supported:** `facet:value OR (facet:value AND facet:value)`\n\nUse quotes if the facet attribute name or facet value contains spaces, keywords (`OR`, `AND`, `NOT`), or quotes.\nIf a facet attribute is an array, the filter matches if it matches at least one element of the array.\n\nFor more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).\n", "x-categories": [ "Filtering" ] }, "frequentlyBoughtTogether": { "type": "object", "properties": { "model": { "$ref": "#/$defs/fbtModel" }, "objectID": { "$ref": "#/$defs/objectID" }, "fallbackParameters": { "$ref": "#/$defs/fallbackParams" } }, "required": [ "model", "objectID" ] }, "getRankingInfo": { "type": "boolean", "description": "Whether the search response should include detailed ranking information.", "default": false, "x-categories": [ "Advanced" ] }, "hide": { "description": "Hide facet values.", "type": "array", "items": { "type": "string" } }, "highlightPostTag": { "type": "string", "description": "HTML tag to insert after the highlighted parts in all highlighted results and snippets.", "default": "", "x-categories": [ "Highlighting and Snippeting" ] }, "highlightPreTag": { "type": "string", "description": "HTML tag to insert before the highlighted parts in all highlighted results and snippets.", "default": "", "x-categories": [ "Highlighting and Snippeting" ] }, "ignorePlurals": { "description": "Treat singular, plurals, and other forms of declensions as equivalent.\nOnly use this feature for the languages used in your index.\n", "oneOf": [ { "type": "array", "description": "ISO code for languages for which this feature should be active.\nThis overrides languages you set with `queryLanguages`.\n", "items": { "$ref": "#/$defs/supportedLanguage" } }, { "$ref": "#/$defs/booleanString" }, { "type": "boolean", "description": "If true, `ignorePlurals` is active for all languages included in `queryLanguages`, or for all supported languages, if `queryLanguges` is empty.\nIf false, singulars, plurals, and other declensions won't be considered equivalent.\n", "default": false } ], "x-categories": [ "Languages" ] }, "indexName": { "type": "string", "description": "Index name (case-sensitive)." }, "insideBoundingBox": { "oneOf": [ { "type": "string" }, { "type": "null" }, { "$ref": "#/$defs/insideBoundingBoxArray" } ] }, "insideBoundingBoxArray": { "type": "array", "items": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "number", "format": "double" } }, "description": "Coordinates for a rectangular area in which to search.\n\nEach bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:\n`[p1 lat, p1 long, p2 lat, p2 long]`.\nProvide multiple bounding boxes as nested arrays.\nFor more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\n", "x-categories": [ "Geo-Search" ] }, "insidePolygon": { "type": "array", "items": { "type": "array", "minItems": 6, "maxItems": 20000, "items": { "type": "number", "format": "double" } }, "description": "Coordinates of a polygon in which to search.\n\nPolygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.\nProvide multiple polygons as nested arrays.\nFor more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\nThis parameter is ignored if you also specify `insideBoundingBox`.\n", "x-categories": [ "Geo-Search" ] }, "lookingSimilar": { "type": "object", "properties": { "model": { "$ref": "#/$defs/lookingSimilarModel" }, "objectID": { "$ref": "#/$defs/objectID" }, "fallbackParameters": { "$ref": "#/$defs/fallbackParams" } }, "required": [ "model", "objectID" ] }, "lookingSimilarModel": { "type": "string", "description": "Looking similar model.\n\nThis model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index.\n", "enum": [ "looking-similar" ] }, "lookingSimilarQuery": { "title": "Looking similar", "allOf": [ { "$ref": "#/$defs/baseRecommendRequest" }, { "$ref": "#/$defs/lookingSimilar" } ] }, "maxFacetHits": { "type": "integer", "description": "Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", "maximum": 100, "default": 10, "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\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n", "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" ] }, "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" ] }, "naturalLanguages": { "type": "array", "items": { "$ref": "#/$defs/supportedLanguage" }, "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches)\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", "default": [], "x-categories": [ "Languages" ] }, "numericFilters": { "description": "Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n", "oneOf": [ { "type": "array", "items": { "$ref": "#/$defs/numericFilters" } }, { "type": "string" } ], "x-categories": [ "Filtering" ] }, "objectID": { "type": "string", "description": "Unique record identifier." }, "optionalFilters": { "description": "Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)).\n- Optional filters don't work with numeric attributes.\n- On virtual replicas, optional filters are applied _after_ the replica's [relevant sort](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).\n", "oneOf": [ { "type": "array", "items": { "$ref": "#/$defs/optionalFilters" } }, { "type": "string" } ], "x-categories": [ "Filtering" ] }, "optionalWords": { "description": "Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is optional,\nthe search engine runs two queries: one for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has fewer than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the required number of matched words increases by the number of optional words divided by 5 (rounded down).\n Example: with 18 optional words, results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 4 matched words.\n\nFor 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).\n", "oneOf": [ { "type": "string" }, { "type": "null" }, { "$ref": "#/$defs/optionalWordsArray" } ] }, "optionalWordsArray": { "type": "array", "items": { "type": "string" }, "description": "List of [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" ] }, "order": { "description": "Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n", "type": "array", "items": { "type": "string" } }, "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\nThe higher this value is, the more Personalization determines the ranking compared to other factors.\nFor more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).\n", "default": 100, "minimum": 0, "maximum": 100, "x-categories": [ "Personalization" ] }, "query": { "type": "string", "description": "Search query.", "default": "", "x-categories": [ "Search" ] }, "queryLanguages": { "type": "array", "items": { "$ref": "#/$defs/supportedLanguage" }, "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis 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.\nTo support this, place the CJK language **first**.\n**Always specify a query language.**\nIf 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),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor 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).\n", "default": [], "x-categories": [ "Languages" ] }, "queryType": { "type": "string", "enum": [ "prefixLast", "prefixAll", "prefixNone" ], "description": "Determines if and how query words are interpreted as prefixes.\n\nBy default, only the last query word is treated as a prefix (`prefixLast`).\nTo turn off prefix search, use `prefixNone`.\nAvoid `prefixAll`, which treats all query words as prefixes.\nThis might lead to counterintuitive results and makes your search slower.\n\nFor more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching).\n", "default": "prefixLast", "x-categories": [ "Query strategy" ] }, "reRankingApplyFilter": { "description": "Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.\n", "oneOf": [ { "type": "array", "items": { "$ref": "#/$defs/reRankingApplyFilter" } }, { "type": "string", "x-categories": [ "Filtering" ] } ] }, "recommendIndexSettings": { "description": "Index settings.", "allOf": [ { "$ref": "#/$defs/baseIndexSettings" }, { "$ref": "#/$defs/baseRecommendIndexSettings" } ] }, "recommendSearchParams": { "title": "Search parameters as object", "description": "Search parameters for filtering the recommendations.", "allOf": [ { "$ref": "#/$defs/baseRecommendSearchParams" }, { "$ref": "#/$defs/searchParamsQuery" }, { "$ref": "#/$defs/recommendIndexSettings" }, { "type": "object", "properties": { "enableRules": { "$ref": "#/$defs/enableRules" } } } ] }, "redirectURL": { "description": "The redirect rule container.", "type": "object", "additionalProperties": false, "properties": { "url": { "type": "string" } } }, "relatedModel": { "type": "string", "description": "Related products or similar content model.\n\nThis model recommends items that are similar to the item with the ID `objectID`.\nSimilarity is determined from the user interactions and attributes.\n", "enum": [ "related-products" ] }, "relatedProducts": { "type": "object", "properties": { "model": { "$ref": "#/$defs/relatedModel" }, "objectID": { "$ref": "#/$defs/objectID" }, "fallbackParameters": { "$ref": "#/$defs/fallbackParams" } }, "required": [ "model", "objectID" ] }, "relatedQuery": { "title": "Related products", "allOf": [ { "$ref": "#/$defs/baseRecommendRequest" }, { "$ref": "#/$defs/relatedProducts" } ] }, "relevancyStrictness": { "type": "integer", "description": "Relevancy threshold below which less relevant results aren't included in the results\nYou 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).\nUse this setting to strike a balance between the relevance and number of returned results.\n", "default": 100, "x-categories": [ "Ranking" ] }, "removeStopWords": { "description": "Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nOnly use this feature for the languages used in your index.\n", "oneOf": [ { "type": "array", "description": "ISO code for languages for which stop words should be removed. This overrides languages you set in `queryLanguges`.", "items": { "$ref": "#/$defs/supportedLanguage" } }, { "type": "boolean", "default": false, "description": "If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty.\nIf false, stop words are not removed.\n" } ], "x-categories": [ "Languages" ] }, "removeWordsIfNoResults": { "type": "string", "enum": [ "none", "lastWords", "firstWords", "allOptional" ], "description": "Strategy for removing words from the query when it doesn't return any results.\nThis helps to avoid returning empty search results.\n\n- `none`.\n No words are removed when a query doesn't return results.\n\n- `lastWords`.\n Treat the last (then second to last, then third to last) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `firstWords`.\n Treat the first (then second, then third) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `allOptional`.\n Treat all words as optional.\n\nFor more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results).\n", "default": "none", "x-categories": [ "Query strategy" ] }, "renderingContent": { "description": "Extra data that can be used in the search UI.\n\nYou can use this to control aspects of your search UI, such as the order of facet names and values\nwithout changing your frontend code.\n", "type": "object", "additionalProperties": false, "properties": { "facetOrdering": { "$ref": "#/$defs/facetOrdering" }, "redirect": { "$ref": "#/$defs/redirectURL" }, "widgets": { "$ref": "#/$defs/widgets" } }, "x-categories": [ "Advanced" ] }, "replaceSynonymsInHighlight": { "type": "boolean", "description": "Whether to replace a highlighted word with the matched synonym\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n", "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\nBy default, all response properties are included.\nTo reduce the response size, you can select which properties should be included\nAn empty list may lead to an empty API response (except properties you can't exclude)\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `abTestVariantID`,\nor any property added by setting `getRankingInfo` to true\nYour search depends on the `hits` field. If you omit this field, searches won't return any results.\nYour UI might also depend on other properties, for example, for pagination.\nBefore restricting the response size, check the impact on your search experience.\n", "default": [ "*" ], "x-categories": [ "Advanced" ] }, "restrictHighlightAndSnippetArrays": { "type": "boolean", "description": "Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n", "default": false, "x-categories": [ "Highlighting and Snippeting" ] }, "restrictSearchableAttributes": { "type": "array", "items": { "type": "string" }, "description": "Restricts a search to a subset of your searchable attributes.\nAttribute names are case-sensitive.\n", "default": [], "x-categories": [ "Filtering" ] }, "ruleContexts": { "type": "array", "items": { "type": "string" }, "description": "Assigns a rule context to the search query\n[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.\n", "default": [], "x-categories": [ "Rules" ] }, "searchParamsQuery": { "type": "object", "additionalProperties": false, "properties": { "query": { "$ref": "#/$defs/query" } } }, "similarQuery": { "type": "string", "description": "Keywords to be used instead of the search query to conduct a more broader search\nUsing the `similarQuery` parameter changes other settings\n- `queryType` is set to `prefixNone`.\n- `removeStopWords` is set to true.\n- `words` is set as the first ranking criterion.\n- All remaining words are treated as `optionalWords`\nSince the `similarQuery` is supposed to do a broad search, they usually return many results.\nCombine it with `filters` to narrow down the list of results.\n", "default": "", "x-categories": [ "Search" ] }, "snippetEllipsisText": { "type": "string", "description": "String used as an ellipsis indicator when a snippet is truncated.", "default": "…", "x-categories": [ "Highlighting and Snippeting" ] }, "sortFacetValuesBy": { "type": "string", "description": "Order in which to retrieve facet values\n- `count`.\n Facet values are retrieved by decreasing count.\n The count is the number of matching records containing this facet value\n- `alpha`.\n Retrieve facet values alphabetically\nThis setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).\nFor more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).\n", "default": "count", "x-categories": [ "Faceting" ] }, "sortRemainingBy": { "description": "Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n", "type": "string", "enum": [ "count", "alpha", "hidden" ] }, "sumOrFiltersScores": { "type": "boolean", "description": "Whether to sum all filter scores\nIf true, all filter scores are summed.\nOtherwise, the maximum filter score is kept.\nFor more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).\n", "default": false, "x-categories": [ "Filtering" ] }, "supportedLanguage": { "type": "string", "description": "ISO code for a supported language.", "enum": [ "af", "ar", "az", "bg", "bn", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fo", "fr", "ga", "gl", "he", "hi", "hu", "hy", "id", "is", "it", "ja", "ka", "kk", "ko", "ku", "ky", "lt", "lv", "mi", "mn", "mr", "ms", "mt", "nb", "nl", "no", "ns", "pl", "ps", "pt", "pt-br", "qu", "ro", "ru", "sk", "sq", "sv", "sw", "ta", "te", "th", "tl", "tn", "tr", "tt", "uk", "ur", "uz", "zh" ] }, "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.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nDifferent from regular facets, `_tags` can only be used for filtering (including or excluding records).\nYou won't get a facet count.\nThe same combination and escaping rules apply as for `facetFilters`.\n", "oneOf": [ { "type": "array", "items": { "$ref": "#/$defs/tagFilters" } }, { "type": "string" } ], "x-categories": [ "Filtering" ] }, "trendingFacets": { "type": "object", "additionalProperties": false, "properties": { "indexName": { "$ref": "#/$defs/indexName" }, "threshold": { "type": "number", "format": "double", "minimum": 0, "maximum": 100, "description": "Minimum score a recommendation must have to be included in the response." }, "maxRecommendations": { "type": "integer", "minimum": 1, "maximum": 30, "default": 30, "description": "Maximum number of recommendations to retrieve.\nBy default, all recommendations are returned and no fallback request is made.\nDepending on the available recommendations and the other request parameters,\nthe actual number of recommendations may be lower than this value.\n" }, "facetName": { "type": "string", "description": "Facet attribute for which to retrieve trending facet values." }, "model": { "$ref": "#/$defs/trendingFacetsModel" } }, "required": [ "indexName", "threshold", "facetName", "model" ] }, "trendingFacetsModel": { "type": "string", "description": "Trending facet values model.\n\nThis model recommends trending facet values for the specified facet attribute.\n", "enum": [ "trending-facets" ] }, "trendingFacetsQuery": { "title": "Trending facet values", "allOf": [ { "$ref": "#/$defs/trendingFacets" } ] }, "trendingItems": { "type": "object", "properties": { "facetName": { "$ref": "#/$defs/facetName" }, "facetValue": { "$ref": "#/$defs/facetValue" }, "model": { "$ref": "#/$defs/trendingItemsModel" }, "fallbackParameters": { "$ref": "#/$defs/fallbackParams" } }, "required": [ "model" ] }, "trendingItemsModel": { "description": "Trending items model.\n\nTrending items are determined from the number of conversion events collected on them.\n", "type": "string", "enum": [ "trending-items" ] }, "trendingItemsQuery": { "title": "Trending items", "allOf": [ { "$ref": "#/$defs/baseRecommendRequest" }, { "$ref": "#/$defs/trendingItems" } ] }, "typoTolerance": { "description": "Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) are also active.\n", "oneOf": [ { "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": "#/$defs/typoToleranceEnum" } ], "x-categories": [ "Typos" ] }, "typoToleranceEnum": { "type": "string", "title": "typo tolerance", "description": "- `min`. Return matches with the lowest number of typos.\n For example, if you have matches without typos, only include those.\n But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).\n- `strict`. Return matches with the two lowest numbers of typos.\n With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.\n", "enum": [ "min", "strict", "true", "false" ] }, "userData": { "description": "An object with custom data.\n\nYou can store up to 32kB as custom data.\n", "default": {}, "x-categories": [ "Advanced" ] }, "userToken": { "type": "string", "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).\n", "x-categories": [ "Personalization" ] }, "value": { "type": "object", "additionalProperties": false, "properties": { "order": { "$ref": "#/$defs/order" }, "sortRemainingBy": { "$ref": "#/$defs/sortRemainingBy" }, "hide": { "$ref": "#/$defs/hide" } } }, "values": { "description": "Order of facet values. One object for each facet.", "type": "object", "additionalProperties": { "x-additionalPropertiesName": "facet", "$ref": "#/$defs/value" } }, "widgets": { "description": "Widgets returned from any rules that are applied to the current search.", "type": "object", "additionalProperties": false, "properties": { "banners": { "$ref": "#/$defs/banners" } } } } }