Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.
The distinct attribute is a special, user-designated field. It is most commonly used to prevent Meilisearch from returning a set of several similar documents, instead forcing it to return only one.You may set a distinct attribute in two ways: using the distinctAttribute index setting during configuration, or the distinct search parameter at search time.
distinctAttribute is an index setting that configures a default distinct attribute Meilisearch applies to all searches and facet retrievals in that index.
There can be only one distinctAttribute per index. Trying to set multiple fields as a distinctAttribute will return an error.
Updating distinctAttribute will re-index all documents in the index, which can take some time. When setting up a new index, we recommend updating your index settings first and then adding documents. This reduces RAM consumption compared to adding documents and then changing settings, since Meilisearch would have to re-index the whole dataset.
The value of a field configured as a distinct attribute will always be unique among returned documents. This means there will never be more than one occurrence of the same value in the distinct attribute field among the returned documents.When multiple documents have the same value for the distinct attribute, Meilisearch returns only the highest-ranked result after applying ranking rules. If two or more documents are equivalent in terms of ranking, Meilisearch returns the first result according to its internal_id.
Suppose you have an e-commerce dataset. For an index that contains information about jackets, you may have several identical items with minor variations such as color or size.As shown below, this dataset contains three documents representing different versions of a Lee jeans leather jacket. One of the jackets is brown, one is black, and the last one is blue.
By default, a search for lee leather jacket would return all three documents. This might not be desired, since displaying nearly identical variations of the same item can make results appear cluttered.In this case, you may want to return only one document with the product_id corresponding to this Lee jeans leather jacket. To do so, you could set product_id as the distinctAttribute.
let task: TaskInfo = client .index("jackets") .set_distinct_attribute("product_id") .await .unwrap();
client.index("jackets").updateDistinctAttribute("product_id") { (result) in switch result { case .success(let task): print(task) case .failure(let error): print(error) }}
By setting distinctAttribute to product_id, search requests will never return more than one document with the same product_id.After setting the distinct attribute as shown above, querying for lee leather jacket would only return the first document found. The response would look like this:
distinct is a search parameter you may add to any search query. It allows you to selectively use distinct attributes depending on the context. distinct takes precedence over distinctAttribute.To use an attribute with distinct, first add it to the filterableAttributes list:
var params = new SearchQuery(){ Distinct = "sku"};await client.Index("products").SearchAsync<Product>("white shirt", params);
let res = client .index("products") .search() .with_query("white shirt") .with_distinct("sku") .execute() .await .unwrap();
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Meilisearch Documentation","colors":{"primary":"#FF5CB2","light":"#FF5CB2","dark":"#FF5CB2"},"logo":{"light":"https://mintcdn.com/meilisearch-6b28dec2/YRn82YKcWv02OWrg/assets/repo/meilisearch-logo-light.svg?fit=max\u0026auto=format\u0026n=YRn82YKcWv02OWrg\u0026q=85\u0026s=331f9ce2d1f557db3b679795f4707aa5","dark":"https://mintcdn.com/meilisearch-6b28dec2/YRn82YKcWv02OWrg/assets/repo/meilisearch-logo-dark.svg?fit=max\u0026auto=format\u0026n=YRn82YKcWv02OWrg\u0026q=85\u0026s=81634cdd715f6f159c69841b5d539d5a"},"favicon":"https://mintcdn.com/meilisearch-6b28dec2/YRn82YKcWv02OWrg/assets/repo/favicon.svg?fit=max\u0026auto=format\u0026n=YRn82YKcWv02OWrg\u0026q=85\u0026s=33f47c7e13dd4d7005f570f6299328a5","api":{"playground":{"display":"simple"}},"appearance":{"default":"dark"},"background":{"decoration":"grid","color":{"light":"#F7F7F7","dark":"#1A003B"}},"navbar":{"links":[{"href":"https://www.meilisearch.com","label":"Website"},{"href":"https://github.com/meilisearch/meilisearch","label":"GitHub"},{"href":"https://discord.meilisearch.com/","label":"Discord"}],"primary":{"type":"button","label":"Start a trial","href":"https://cloud.meilisearch.com"}},"footer":{"socials":{"x":"https://x.com/meilisearch","github":"https://github.com/meilisearch","linkedin":"https://www.linkedin.com/company/meilisearch","website":"https://www.meilisearch.com"},"links":[{"header":"Product","items":[{"label":"Meilisearch Cloud","href":"https://www.meilisearch.com/cloud"},{"label":"AI search","href":"https://www.meilisearch.com/solutions/hybrid-search"},{"label":"Pricing","href":"https://www.meilisearch.com/pricing"},{"label":"Documentation","href":"https://www.meilisearch.com/docs"},{"label":"Roadmap","href":"https://roadmap.meilisearch.com"},{"label":"Release notes","href":"https://updates.cloud.meilisearch.com/"},{"label":"Comparisons","href":"https://www.meilisearch.com/docs/resources/comparisons/alternatives"},{"label":"Trust center","href":"https://trust.meilisearch.com/"}]},{"header":"Contact us","items":[{"label":"GitHub","href":"https://github.com/meilisearch"},{"label":"Discord","href":"https://discord.gg/meilisearch"},{"label":"Newsletter","href":"https://share-eu1.hsforms.com/1LN5N0x_GQgq7ss7tXmSykwfg3aq"},{"label":"Helpdesk","href":"https://help.meilisearch.com/"}]},{"header":"Company","items":[{"label":"Blog","href":"https://meilisearch.com/blog"},{"label":"Customers","href":"https://www.meilisearch.com/customers"},{"label":"Careers","href":"https://www.meilisearch.com/careers"},{"label":"Code of Conduct","href":"https://github.com/meilisearch/MeiliSearch/blob/main/CODE_OF_CONDUCT.md"},{"label":"Privacy Policy","href":"https://www.meilisearch.com/privacy-policy"},{"label":"Terms of Use","href":"https://www.meilisearch.com/terms-of-use"},{"label":"Swag","href":"https://swag.meilisearch.com/"}]}]},"seo":{"metatags":{"canonical":"https://www.meilisearch.com/docs"}},"integrations":{"fathom":{"siteId":"QNBPJXIV"},"gtm":{"tagId":"GTM-TNSCGVBH"},"posthog":{"apiKey":"phc_D5VtJkw6WyBzLtZ5tBvwR7ac4LvQZdFGYQTQfegRjh9n","apiHost":"https://t.meilisearch.com","sessionRecording":true},"segment":{"key":"KIC0Lcb5C9ssRY79dUKPOK8Wq6wLHiUP"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"meilisearch-6b28dec2","hasAudioNarration":false,"actualSubdomain":"meilisearch-6b28dec2","customDomains":["www.meilisearch.com","meilisearch.dev"],"gitSource":{"type":"github","owner":"meilisearch","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae1c4838e4709662983cc24","collectionId":"668baffb-e41e-4284-8a34-083961efc684","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae1c4838e4709662983cc24"},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4d82d6d11d33003dd1ea2","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Capabilities","count":168},{"language":"default","tag":"Reference","count":150},{"language":"default","tag":"API Routes","count":143},{"language":"default","tag":"Resources","count":89},{"language":"default","tag":"Settings","count":69},{"language":"default","tag":"How to","count":62},{"language":"default","tag":"Getting started","count":52},{"language":"default","tag":"Advanced","count":30},{"language":"default","tag":"Self-hosting","count":29},{"language":"default","tag":"Platform","count":27}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dark\\:text-gray-400:is(.dark *){color:rgb(var(--gray-300))}#navigation-items h5{text-transform:uppercase}.callout h2,.callout h3,.callout h4,.callout h5,.callout h6{color:inherit}.noticeTag{color:rgb(var(--primary-light));border:1px solid rgb(var(--primary-light));padding:0 .5em;margin-left:.25em;display:inline-block;border-radius:5px;font-size:.8em}.routeHighlighter{--route-highlighter-color:rgba(100, 100, 100, 0.35);display:flex;border-radius:.375rem;border:1px var(--route-highlighter-color) solid;padding:1rem;gap:2rem;align-items:center;overflow:scroll}.routeHighlighter--GET{--route-highlighter-color:oklch(0.792 0.209 151.711)}.routeHighlighter--POST{--route-highlighter-color:oklch(0.623 0.214 259.815)}.routeHighlighter--DELETE{--route-highlighter-color:oklch(63.7% 0.237 25.331)}.routeHighlighter--PATCH,.routeHighlighter--PUT{--route-highlighter-color:oklch(0.828 0.189 84.429)}.routeHighlighter__method{font-weight:700;color:var(--route-highlighter-color)}.routeHighlighter__path{font-family:var(--font-jetbrains-mono),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace}"},{"filePath":"meilisearch-search-bar.css","content":".meilisearch-bar-container{max-width:480px;width:100%;margin:0 auto;padding:0 10px}.meilisearch-search-bar{background-color:#fff;color:rgba(25,25,25,.7);border:1px solid rgba(255,255,255,.1);display:flex;align-items:center;border-radius:12px;padding:8px 16px;cursor:pointer;width:100%;transition:all .2s ease;backdrop-filter:blur(8px);font-size:14px}.dark .meilisearch-search-bar{background-color:rgba(25,17,53,.5);color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.1)}.meilisearch-search-bar__text{flex-grow:1}.meilisearch-search-bar__shortcut{opacity:.7;font-size:12px}.meilisearch-flexwrapper{display:flex;justify-content:center;align-items:center;width:100%}.meilisearch-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;backdrop-filter:blur(8px);background-color:rgba(0,0,0,.4);z-index:9999;display:none;align-items:flex-start;justify-content:center;padding-top:0;box-sizing:border-box}.meilisearch-modal{background-color:#fff;border:1px solid rgba(0,0,0,.5);width:600px;max-width:90%;max-height:80vh;margin-top:70px;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.3);display:flex;flex-direction:column;overflow:hidden}.dark .meilisearch-modal{background-color:#1a1033;border:1px solid rgba(255,255,255,.1)}.meilisearch-modal__input-container{display:flex;align-items:center;padding:16px 20px;border-bottom:1px solid rgba(0,0,0,.1)}.dark .meilisearch-modal__input-container{border-bottom:1px solid rgba(255,255,255,.1)}.meilisearch-modal__input{background:0 0;border:0;font-size:16px;outline:0;width:100%;margin-right:10px;color:rgb(var(--gray-700))}.dark .meilisearch-modal__input{color:rgb(var(--gray-100))}.meilisearch-modal__escape{font-size:12px;padding:4px 8px;border-radius:4px;margin-left:auto;background-color:rgba(0,0,0,.1)}.dark .meilisearch-modal__escape{color:rgba(255,255,255,.5);background-color:rgba(255,255,255,.1)}.meilisearch-modal__results{flex-grow:1;overflow-y:auto;padding:0}.meilisearch-modal__indicator{padding:20px;text-align:center}.dark .meilisearch-modal__indicator{color:rgba(255,255,255,.7)}.meilisearch-modal__result{display:block;padding:12px 20px;text-decoration:none;border-left:3px solid transparent;transition:background-color .2s,border-color .2s}.dark .meilisearch-modal__result{color:#fff}.meilisearch-modal__result:hover{background-color:rgba(0,0,0,.05);border-left-color:#f472b6}.dark .meilisearch-modal__result:hover{background-color:rgba(255,255,255,.05)}.meilisearch-modal__category-header{padding:12px 20px 8px;font-size:14px;font-weight:600;text-transform:uppercase;color:rgba(0,0,0,.45)}.dark .meilisearch-modal__category-header{color:rgba(255,255,255,.5)}.meilisearch-modal__result-heading{font-weight:500;margin-bottom:4px}.meilisearch-modal__result-content{font-size:13px;color:rgba(0,0,0,.45)}.dark .meilisearch-modal__result-content{color:rgba(255,255,255,.6)}.meilisearch-modal__category-em{font-style:normal;color:#f472b6;font-weight:700}.meilisearch-modal__error{padding:20px;text-align:center;color:#f87171}.meilisearch-filter-container{padding:16px 20px;border-bottom:1px solid rgba(0,0,0,.1);background-color:rgba(0,0,0,.02)}.dark .meilisearch-filter-container{border-bottom:1px solid rgba(255,255,255,.1);background-color:rgba(255,255,255,.02)}.meilisearch-filter-title{font-size:14px;font-weight:500;color:rgba(0,0,0,.7);margin-bottom:12px}.dark .meilisearch-filter-title{color:rgba(255,255,255,.7)}.meilisearch-filter-tags{display:flex;flex-wrap:wrap;gap:8px}.meilisearch-filter-tag{background-color:rgba(0,0,0,.05);border:1px solid rgba(0,0,0,.1);border-radius:6px;padding:6px 12px;font-size:13px;font-weight:500;color:rgba(0,0,0,.7);cursor:pointer;transition:all .2s ease;text-transform:capitalize}.dark .meilisearch-filter-tag{background-color:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.7)}.meilisearch-filter-tag:hover{background-color:rgba(0,0,0,.1);border-color:rgba(0,0,0,.2)}.dark .meilisearch-filter-tag:hover{background-color:rgba(255,255,255,.1);border-color:rgba(255,255,255,.2)}.meilisearch-filter-tag.active{background-color:#f472b6;border-color:#f472b6;color:#fff}.meilisearch-filter-tag.active:hover{background-color:#cb4d86;border-color:#cb4d86}"}],"page":{"pagePath":"capabilities/full_text_search/how_to/configure_distinct_attribute","slug":"/capabilities/full_text_search/how_to/configure_distinct_attribute","pageMetadata":{"title":"Configure distinct attribute","sidebarTitle":"Configure distinct attribute","description":"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.","href":"/capabilities/full_text_search/how_to/configure_distinct_attribute"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The distinct attribute is a special, user-designated field. It is most commonly used to prevent Meilisearch from returning a set of several similar documents, instead forcing it to return only one.`}),`\n`,_jsxs(_components.p,{children:[`You may set a distinct attribute in two ways: using the `,_jsx(_components.code,{children:`distinctAttribute`}),` index setting during configuration, or the `,_jsx(_components.code,{children:`distinct`}),` search parameter at search time.`]}),`\n`,_jsx(Heading,{level:`2`,id:`setting-a-distinct-attribute-during-configuration`,children:`Setting a distinct attribute during configuration`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`distinctAttribute`}),` is an index setting that configures a default distinct attribute Meilisearch applies to all searches and facet retrievals in that index.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`There can be only one `,_jsx(_components.code,{children:`distinctAttribute`}),` per index. Trying to set multiple fields as a `,_jsx(_components.code,{children:`distinctAttribute`}),` will return an error.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Updating `,_jsx(_components.code,{children:`distinctAttribute`}),` will re-index all documents in the index, which can take some time. When setting up a new index, we recommend updating your index settings first and then adding documents. This reduces RAM consumption compared to adding documents and then changing settings, since Meilisearch would have to re-index the whole dataset.`]})}),`\n`,_jsxs(_components.p,{children:[`The value of a field configured as a distinct attribute will always be unique among returned documents. This means `,_jsx(_components.strong,{children:`there will never be more than one occurrence of the same value`}),` in the distinct attribute field among the returned documents.`]}),`\n`,_jsxs(_components.p,{children:[`When multiple documents have the same value for the distinct attribute, Meilisearch returns only the highest-ranked result after applying `,_jsx(_components.a,{href:`/capabilities/full_text_search/relevancy/ranking_rules`,children:`ranking rules`}),`. If two or more documents are equivalent in terms of ranking, Meilisearch returns the first result according to its `,_jsx(_components.code,{children:`internal_id`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(_components.p,{children:`Suppose you have an e-commerce dataset. For an index that contains information about jackets, you may have several identical items with minor variations such as color or size.`}),`\n`,_jsx(_components.p,{children:`As shown below, this dataset contains three documents representing different versions of a Lee jeans leather jacket. One of the jackets is brown, one is black, and the last one is blue.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Leather jacket\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"brand\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lee jeans\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"color\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"brown\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Leather jacket\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"brand\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lee jeans\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"color\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"black\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Leather jacket\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"brand\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lee jeans\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"color\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"blue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`By default, a search for `,_jsx(_components.code,{children:`lee leather jacket`}),` would return all three documents. This might not be desired, since displaying nearly identical variations of the same item can make results appear cluttered.`]}),`\n`,_jsxs(_components.p,{children:[`In this case, you may want to return only one document with the `,_jsx(_components.code,{children:`product_id`}),` corresponding to this Lee jeans leather jacket. To do so, you could set `,_jsx(_components.code,{children:`product_id`}),` as the `,_jsx(_components.code,{children:`distinctAttribute`}),`.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'MEILISEARCH_URL/indexes/jackets/settings/distinct-attribute'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer API_KEY'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\"product_id\"'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JS`,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'jackets'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateDistinctAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.index(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'jackets'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).update_distinct_attribute(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,numberOfLines:`1`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'jackets'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateDistinctAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Java`,numberOfLines:`1`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jackets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateDistinctAttributeSettings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ruby`,numberOfLines:`1`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'jackets'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update_distinct_attribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,numberOfLines:`1`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jackets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`UpdateDistinctAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`C#`,numberOfLines:`1`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jackets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`UpdateDistinctAttributeAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Rust`,numberOfLines:`5`,language:`rust`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`rust`,children:_jsxs(_components.code,{language:`rust`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` task`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TaskInfo`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jackets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set_distinct_attribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`unwrap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Swift`,numberOfLines:`8`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jackets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`updateDistinctAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { (result) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` switch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`success`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` task)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(task)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`failure`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(error)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Dart`,numberOfLines:`1`,language:`dart`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`dart`,children:_jsxs(_components.code,{language:`dart`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'jackets'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateDistinctAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`By setting `,_jsx(_components.code,{children:`distinctAttribute`}),` to `,_jsx(_components.code,{children:`product_id`}),`, search requests `,_jsxs(_components.strong,{children:[`will never return more than one document with the same `,_jsx(_components.code,{children:`product_id`})]}),`.`]}),`\n`,_jsxs(_components.p,{children:[`After setting the distinct attribute as shown above, querying for `,_jsx(_components.code,{children:`lee leather jacket`}),` would only return the first document found. The response would look like this:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Leather jacket\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"brand\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lee jeans\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"color\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"brown\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"offset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"limit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"estimatedTotalHits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"processingTimeMs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lee leather jacket\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`For more in-depth information on distinct attribute, consult the `,_jsx(_components.a,{href:`/reference/api/settings/get-distinctattribute`,children:`API reference`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`setting-a-distinct-attribute-at-search-time`,children:`Setting a distinct attribute at search time`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`distinct`}),` is a search parameter you may add to any search query. It allows you to selectively use distinct attributes depending on the context. `,_jsx(_components.code,{children:`distinct`}),` takes precedence over `,_jsx(_components.code,{children:`distinctAttribute`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`To use an attribute with `,_jsx(_components.code,{children:`distinct`}),`, first add it to the `,_jsx(_components.code,{children:`filterableAttributes`}),` list:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'MEILISEARCH_URL/indexes/products/settings/filterable-attributes'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer API_KEY'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '[`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sku\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JS`,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateFilterableAttributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sku'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.index(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).update_filterable_attributes([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sku'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,numberOfLines:`1`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateFilterableAttributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sku'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Java`,numberOfLines:`3`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Settings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Settings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`settings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setFilterableAttributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[] { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SKU\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateSettings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(settings);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ruby`,numberOfLines:`5`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update_filterable_attributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'product_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sku'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'url'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,numberOfLines:`6`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filterableAttributes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`interface`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{}{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`UpdateFilterableAttributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filterableAttributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`C#`,numberOfLines:`2`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`List`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`attributes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TaskInfo`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`UpdateFilterableAttributesAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`attributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Rust`,numberOfLines:`7`,language:`rust`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`rust`,children:_jsxs(_components.code,{language:`rust`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` task`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TaskInfo`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`settings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set_filterable_attributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`execute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`unwrap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Then use `,_jsx(_components.code,{children:`distinct`}),` in a search query, specifying one of the configured attributes:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'MEILISEARCH_URL/indexes/products/search'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer API_KEY'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"q\": \"white shirt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"distinct\": \"sku\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JS`,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'white shirt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`distinct:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sku'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.index(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).search(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'white shirt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { distinct: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sku'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,numberOfLines:`3`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'white shirt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'distinct'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sku'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Java`,numberOfLines:`2`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`SearchRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` searchRequest`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SearchRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`builder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`q`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"white shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`distinct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`build`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(searchRequest);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ruby`,numberOfLines:`3`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'products'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'white shirt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` distinct:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sku'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,numberOfLines:`3`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"white shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`meilisearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`SearchRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Distinct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`C#`,numberOfLines:`5`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` params`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SearchQuery`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Distinct`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sku\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SearchAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Product`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"white shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Rust`,numberOfLines:`8`,language:`rust`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`rust`,children:_jsxs(_components.code,{language:`rust`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`with_query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"white shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`with_distinct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`execute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`unwrap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configure distinct attribute","sidebarTitle":"Configure distinct attribute","description":"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.","href":"/capabilities/full_text_search/how_to/configure_distinct_attribute"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Setting a distinct attribute during configuration","slug":"setting-a-distinct-attribute-during-configuration","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Setting a distinct attribute at search time","slug":"setting-a-distinct-attribute-at-search-time","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/meilisearch-6b28dec2/c598d5c5cb296702/search.js","/docs/_mintlify/custom/meilisearch-6b28dec2/92f00249b2342156/cookieyes-banner.js","/docs/_mintlify/custom/meilisearch-6b28dec2/7302b02a474aa050/fathom-data-attr.js","/docs/_mintlify/custom/meilisearch-6b28dec2/85493af1bed6e7fb/gtm.js"],"subdomain":"meilisearch-6b28dec2","siteName":"Meilisearch Documentation","title":"Configure distinct attribute - Meilisearch Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-19T09:16:05.081Z","originalFileLocation":"capabilities/full_text_search/how_to/configure_distinct_attribute.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Meilisearch Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configure distinct attribute - Meilisearch Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Meilisearch Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://meilisearch-6b28dec2.mintlify.app/_mintlify/api/og/v2?division=How+to\u0026amp;title=Configure+distinct+attribute\u0026amp;description=Use+the+distinct+attribute+to+deduplicate+search+results+by+returning+only+one+document+per+unique+value+of+a+given+field.\u0026amp;theme=25515a5016844863e4538b41\u0026amp;signature=5c65b3c76c828a52a9b9302ba1244ac5837ee3a75961ae83195c610a18c23b4c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configure distinct attribute - Meilisearch Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://meilisearch-6b28dec2.mintlify.app/_mintlify/api/og/v2?division=How+to\u0026amp;title=Configure+distinct+attribute\u0026amp;description=Use+the+distinct+attribute+to+deduplicate+search+results+by+returning+only+one+document+per+unique+value+of+a+given+field.\u0026amp;theme=25515a5016844863e4538b41\u0026amp;signature=5c65b3c76c828a52a9b9302ba1244ac5837ee3a75961ae83195c610a18c23b4c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/meilisearch-6b28dec2/6t6RePI0bXwGcKSs/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Meilisearch Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF5CB2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/capabilities/full_text_search/how_to/configure_distinct_attribute.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.meilisearch.com/#organization\",\"name\":\"Meilisearch Documentation\",\"url\":\"https://www.meilisearch.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/meilisearch-6b28dec2/YRn82YKcWv02OWrg/assets/repo/meilisearch-logo-light.svg?fit=max\u0026auto=format\u0026n=YRn82YKcWv02OWrg\u0026q=85\u0026s=331f9ce2d1f557db3b679795f4707aa5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.meilisearch.com/docs#website\",\"name\":\"Meilisearch Documentation\",\"url\":\"https://www.meilisearch.com/docs\",\"publisher\":{\"@id\":\"https://www.meilisearch.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute#webpage\",\"url\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute\",\"name\":\"Configure distinct attribute\",\"description\":\"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.\",\"dateModified\":\"2026-08-19T09:16:05.081Z\",\"isPartOf\":{\"@id\":\"https://www.meilisearch.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Full-text search\",\"item\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to\",\"item\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_searchable_attributes\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Configure distinct attribute\",\"item\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute#article\",\"headline\":\"Configure distinct attribute\",\"name\":\"Configure distinct attribute\",\"description\":\"Use the distinct attribute to deduplicate search results by returning only one document per unique value of a given field.\",\"url\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute\",\"mainEntityOfPage\":{\"@id\":\"https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/configure_distinct_attribute#webpage\"},\"dateModified\":\"2026-08-19T09:16:05.081Z\",\"publisher\":{\"@id\":\"https://www.meilisearch.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.meilisearch.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Meilisearch Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Meilisearch Documentation","nav":{"global":null,"tabs":[{"tab":"Getting started","pages":[{"title":"Getting started","href":"/getting_started/overview"}]},{"tab":"Capabilities","groups":[{"group":"Capabilities","pages":[{"title":"Capabilities overview","sidebarTitle":"Overview","href":"/capabilities/overview"}]},{"group":"Full-text search","pages":[{"title":"Full-text search","sidebarTitle":"Overview","href":"/capabilities/full_text_search/overview"},{"group":"Getting started","pages":[{"title":"Your first search","sidebarTitle":"Your first search","href":"/capabilities/full_text_search/getting_started/basic_search"},{"title":"Placeholder search","href":"/capabilities/full_text_search/getting_started/placeholder_search"},{"title":"Search with snippets","href":"/capabilities/full_text_search/getting_started/search_with_snippets"},{"title":"Phrase search","href":"/capabilities/full_text_search/getting_started/phrase_search"}]},{"group":"How to","pages":[{"title":"Configure searchable attributes","href":"/capabilities/full_text_search/how_to/configure_searchable_attributes"},{"title":"Configure stop words","href":"/capabilities/full_text_search/how_to/configure_stop_words"},{"title":"Configure prefix search","href":"/capabilities/full_text_search/how_to/configure_prefix_search"},{"title":"Configure a custom dictionary","sidebarTitle":"Configure dictionary","href":"/capabilities/full_text_search/how_to/configure_dictionary"},{"title":"Highlight search results","href":"/capabilities/full_text_search/how_to/highlight_search_results"},{"title":"Use matching strategy","href":"/capabilities/full_text_search/how_to/use_matching_strategy"},{"title":"Configure search cutoff","href":"/capabilities/full_text_search/how_to/configure_search_cutoff"},{"title":"Configure displayed attributes","sidebarTitle":"Configure displayed attributes","description":"Choose which document fields appear in search results by setting the displayedAttributes index setting.","href":"/capabilities/full_text_search/how_to/configure_displayed_attributes"},{"title":"Configure distinct attribute","sidebarTitle":"Configure distinct attribute","href":"/capabilities/full_text_search/how_to/configure_distinct_attribute"},{"title":"Paginate search results","sidebarTitle":"Paginate results","description":"Implement pagination for search results using offset/limit or page/hitsPerPage.","href":"/capabilities/full_text_search/how_to/paginate_search_results"}]},{"group":"Relevancy","pages":[{"title":"Relevancy","sidebarTitle":"Relevancy","href":"/capabilities/full_text_search/relevancy/relevancy"},{"title":"Built-in ranking rules","sidebarTitle":"Built-in ranking rules","href":"/capabilities/full_text_search/relevancy/ranking_rules"},{"title":"Custom ranking rules","sidebarTitle":"Custom ranking rules","href":"/capabilities/full_text_search/relevancy/custom_ranking_rules"},{"title":"Ranking score","sidebarTitle":"Ranking score","href":"/capabilities/full_text_search/relevancy/ranking_score"},{"title":"Attribute ranking order","sidebarTitle":"Attribute ranking order","href":"/capabilities/full_text_search/relevancy/attribute_ranking_order"},{"title":"Typo tolerance","sidebarTitle":"Typo tolerance","href":"/capabilities/full_text_search/relevancy/typo_tolerance_settings"},{"title":"Synonyms","sidebarTitle":"Synonyms","href":"/capabilities/full_text_search/relevancy/synonyms"}]},{"group":"Advanced","pages":[{"title":"Ranking pipeline","href":"/capabilities/full_text_search/advanced/ranking_pipeline"},{"title":"Performance tuning","sidebarTitle":"Performance tuning","href":"/capabilities/full_text_search/advanced/performance_tuning"},{"title":"Debug search performance","href":"/capabilities/full_text_search/advanced/debug_search_performance"}]}]},{"group":"Hybrid and semantic search","pages":[{"title":"Hybrid and semantic search","sidebarTitle":"Overview","href":"/capabilities/hybrid_search/overview"},{"title":"Getting started with AI-powered search","sidebarTitle":"Getting started","href":"/capabilities/hybrid_search/getting_started"},{"group":"How to","pages":[{"title":"Which embedder should I choose?","sidebarTitle":"Choose an embedder","href":"/capabilities/hybrid_search/how_to/choose_an_embedder"},{"title":"Use AI-powered search with user-provided embeddings","sidebarTitle":"Use AI-powered search with user-provided embeddings","href":"/capabilities/hybrid_search/how_to/search_with_user_provided_embeddings"},{"title":"Image search with multimodal embeddings","href":"/capabilities/hybrid_search/how_to/image_search_with_multimodal"},{"title":"Image search with user-provided embeddings","href":"/capabilities/hybrid_search/how_to/image_search_with_user_embeddings"}]},{"group":"Advanced","pages":[{"title":"Semantic vs hybrid search","href":"/capabilities/hybrid_search/advanced/semantic_vs_hybrid"},{"title":"Document template best practices","href":"/capabilities/hybrid_search/advanced/document_template_best_practices"},{"title":"Custom hybrid ranking","href":"/capabilities/hybrid_search/advanced/custom_hybrid_ranking"},{"title":"Composite embedders","href":"/capabilities/hybrid_search/advanced/composite_embedders"},{"title":"Binary quantization","sidebarTitle":"Binary quantization","href":"/capabilities/hybrid_search/advanced/binary_quantization"},{"title":"Multiple embedders","sidebarTitle":"Multiple embedders","href":"/capabilities/hybrid_search/advanced/multiple_embedders"},{"title":"Tune the `distribution` of semantic scores","href":"/capabilities/hybrid_search/advanced/tune_distribution"}]},{"group":"Providers","pages":[{"title":"Configure OpenAI embedder","sidebarTitle":"OpenAI","href":"/capabilities/hybrid_search/how_to/configure_openai_embedder"},{"title":"Configure Cohere embedder","sidebarTitle":"Cohere","href":"/capabilities/hybrid_search/how_to/configure_cohere_embedder"},{"title":"Configure HuggingFace embedder","sidebarTitle":"HuggingFace (local)","href":"/capabilities/hybrid_search/how_to/configure_huggingface_embedder"},{"title":"Configure a REST embedder","sidebarTitle":"REST (any API)","href":"/capabilities/hybrid_search/how_to/configure_rest_embedder"},{"title":"Semantic Search with Mistral Embeddings","sidebarTitle":"Mistral","href":"/capabilities/hybrid_search/providers/mistral"},{"title":"Semantic Search with Gemini Embeddings","sidebarTitle":"Google Gemini","href":"/capabilities/hybrid_search/providers/gemini"},{"title":"Semantic Search with Cloudflare Workers AI Embeddings","sidebarTitle":"Cloudflare Workers AI","href":"/capabilities/hybrid_search/providers/cloudflare"},{"title":"Semantic Search with Voyage AI Embeddings","sidebarTitle":"Voyage AI","href":"/capabilities/hybrid_search/providers/voyage"},{"title":"Semantic Search with AWS Bedrock Embeddings","sidebarTitle":"AWS Bedrock","href":"/capabilities/hybrid_search/providers/bedrock"},{"title":"Semantic Search with Jina Embeddings","sidebarTitle":"Jina","href":"/capabilities/hybrid_search/providers/jina"},{"title":"Multimodal search with TwelveLabs Marengo","sidebarTitle":"TwelveLabs","href":"/capabilities/hybrid_search/providers/twelvelabs"},{"title":"Semantic Search with Hugging Face Inference Endpoints","sidebarTitle":"HuggingFace Inference","href":"/capabilities/hybrid_search/providers/huggingface"}]}]},{"group":"Geo search","pages":[{"title":"Geo search","sidebarTitle":"Overview","href":"/capabilities/geo_search/overview"},{"title":"Geosearch","sidebarTitle":"Getting started","href":"/capabilities/geo_search/getting_started"},{"group":"How to","pages":[{"title":"Filter by geo radius","href":"/capabilities/geo_search/how_to/filter_by_geo_radius"},{"title":"Filter by geo bounding box","href":"/capabilities/geo_search/how_to/filter_by_geo_bounding_box"},{"title":"Filter by geo polygon","href":"/capabilities/geo_search/how_to/filter_by_geo_polygon"},{"title":"Sort by geo point","href":"/capabilities/geo_search/how_to/sort_by_geo_point"},{"title":"Use GeoJSON format","href":"/capabilities/geo_search/how_to/use_geojson_format"}]}]},{"group":"Agentic search","pages":[{"title":"What is agentic search?","sidebarTitle":"Overview","href":"/capabilities/agentic_search/overview"},{"title":"Getting started with agentic search","sidebarTitle":"Getting started","href":"/capabilities/agentic_search/getting_started"},{"group":"How to","pages":[{"title":"Configure guardrails","href":"/capabilities/agentic_search/how_to/configure_guardrails"},{"title":"Display source documents","href":"/capabilities/agentic_search/how_to/display_source_documents"},{"title":"Handle errors and fallbacks","href":"/capabilities/agentic_search/how_to/handle_errors_and_fallbacks"},{"title":"Optimize chat prompts","href":"/capabilities/agentic_search/how_to/optimize_chat_prompts"}]},{"group":"Advanced","pages":[{"title":"Reduce hallucination","href":"/capabilities/agentic_search/advanced/reduce_hallucination"},{"title":"Chats API","sidebarTitle":"Chats API (experimental)","href":"/capabilities/agentic_search/advanced/chats_api"}]}]},{"group":"Multi-search","pages":[{"title":"Multi-search","sidebarTitle":"Overview","href":"/capabilities/multi_search/overview"},{"group":"Getting started","pages":[{"title":"Multi-index search","sidebarTitle":"Multi-index search","href":"/capabilities/multi_search/getting_started/multi_search"},{"title":"Federated search","sidebarTitle":"Federated search","href":"/capabilities/multi_search/getting_started/federated_search"}]},{"group":"How to","pages":[{"title":"Boost results across indexes","sidebarTitle":"Boost results across indexes","href":"/capabilities/multi_search/how_to/boost_results_across_indexes"},{"title":"Search with different filters per index","sidebarTitle":"Search with different filters per index","href":"/capabilities/multi_search/how_to/search_with_different_filters"},{"title":"Build a unified search bar","sidebarTitle":"Build a unified search bar","href":"/capabilities/multi_search/how_to/build_unified_search_bar"},{"title":"Combine text and image search","href":"/capabilities/multi_search/how_to/combine_text_and_image_search"}]}]},{"group":"Filtering, sorting, and faceting","pages":[{"title":"Filtering, sorting, and faceting","sidebarTitle":"Overview","href":"/capabilities/filtering_sorting_faceting/overview"},{"title":"Filter search results","sidebarTitle":"Getting started","href":"/capabilities/filtering_sorting_faceting/getting_started"},{"group":"How to","pages":[{"title":"Search with facets","sidebarTitle":"Search with facets","href":"/capabilities/filtering_sorting_faceting/how_to/filter_with_facets"},{"title":"Search within facet values","sidebarTitle":"Facet search","href":"/capabilities/filtering_sorting_faceting/how_to/facet_search"},{"title":"Sort search results","sidebarTitle":"Sort search results","href":"/capabilities/filtering_sorting_faceting/how_to/sort_results"},{"title":"Filtering and sorting by date","sidebarTitle":"Filter and sort by date","href":"/capabilities/filtering_sorting_faceting/how_to/filter_and_sort_by_date"},{"title":"Combine filters and sort","sidebarTitle":"Combine filters and sort","href":"/capabilities/filtering_sorting_faceting/how_to/combine_filters_and_sort"},{"title":"Build faceted navigation","sidebarTitle":"Build faceted navigation","href":"/capabilities/filtering_sorting_faceting/how_to/build_faceted_navigation"},{"title":"Configure granular filterable attributes","href":"/capabilities/filtering_sorting_faceting/how_to/configure_granular_filters"},{"title":"Search and filter together","href":"/capabilities/filtering_sorting_faceting/how_to/search_and_filter_together"},{"title":"Handle large facet cardinality","href":"/capabilities/filtering_sorting_faceting/how_to/handle_large_facet_cardinality"}]},{"group":"Advanced","pages":[{"title":"Filter expression reference","sidebarTitle":"Filter expression reference","href":"/capabilities/filtering_sorting_faceting/advanced/filter_expression_syntax"},{"title":"Optimize facet performance","sidebarTitle":"Optimize facet performance","href":"/capabilities/filtering_sorting_faceting/advanced/optimize_facet_performance"},{"title":"Build disjunctive facets","sidebarTitle":"Disjunctive facets","href":"/capabilities/filtering_sorting_faceting/advanced/disjunctive_facets"},{"title":"Foreign filters","sidebarTitle":"Foreign filters","href":"/capabilities/filtering_sorting_faceting/advanced/filtering_by_joined_data"},{"title":"Precise filtering with array relationships","sidebarTitle":"Precise filtering with arrays","href":"/capabilities/filtering_sorting_faceting/advanced/precise_filtering_array_items"}]}]},{"group":"Personalization","pages":[{"title":"Personalization and recommendations","sidebarTitle":"Overview","href":"/capabilities/personalization/overview"},{"group":"Getting started","pages":[{"title":"Performing personalized search queries","sidebarTitle":"Personalized search","href":"/capabilities/personalization/getting_started/personalized_search"},{"title":"Building recommendations with similar documents","sidebarTitle":"Recommendations","href":"/capabilities/personalization/getting_started/recommendations"}]},{"group":"How to","pages":[{"title":"Generate user context","href":"/capabilities/personalization/how_to/generate_user_context"},{"title":"Personalize ecommerce search","href":"/capabilities/personalization/how_to/personalize_ecommerce_search"}]}]},{"group":"Analytics","pages":[{"title":"Analytics","sidebarTitle":"Overview","href":"/capabilities/analytics/overview"},{"title":"Configure analytics events","sidebarTitle":"Getting started","href":"/capabilities/analytics/getting_started"},{"group":"How to","pages":[{"title":"Bind search analytics events to a user","sidebarTitle":"Bind search analytics events to a user","href":"/capabilities/analytics/how_to/bind_events_to_user"},{"title":"Track click events","sidebarTitle":"Track click events","href":"/capabilities/analytics/how_to/track_click_events"},{"title":"Track conversion events","sidebarTitle":"Track conversion events","href":"/capabilities/analytics/how_to/track_conversion_events"},{"title":"Exclude search requests from analytics","sidebarTitle":"Exclude search requests from analytics","href":"/capabilities/analytics/how_to/ignore_search_requests"}]},{"group":"Advanced","pages":[{"title":"Analytics metrics reference","href":"/capabilities/analytics/advanced/analytics_metrics"},{"title":"Analytics events endpoint","href":"/capabilities/analytics/advanced/events_endpoint"},{"title":"Migrate to the November 2025 Meilisearch Cloud analytics","href":"/capabilities/analytics/advanced/migrate_analytics"}]}]},{"group":"Security and tenant tokens","pages":[{"title":"Security and tenant tokens","sidebarTitle":"Overview","href":"/capabilities/security/overview"},{"title":"Multitenancy and tenant tokens","sidebarTitle":"Getting started","href":"/capabilities/security/getting_started"},{"group":"How to","pages":[{"title":"Generate tenant tokens without a Meilisearch SDK","sidebarTitle":"Generate tenant tokens without a Meilisearch SDK","href":"/capabilities/security/how_to/generate_token_third_party"},{"title":"Generate a tenant token without a library","sidebarTitle":"Generate a tenant token without a library","href":"/capabilities/security/how_to/generate_token_from_scratch"},{"title":"Manage API keys","sidebarTitle":"Manage API keys","href":"/capabilities/security/how_to/manage_api_keys"}]},{"group":"Advanced","pages":[{"title":"Tenant token payload reference","sidebarTitle":"Tenant token payload reference","href":"/capabilities/security/advanced/tenant_token_payload"},{"title":"Role-based access control with joins","sidebarTitle":"RBAC with joins","href":"/capabilities/security/advanced/rbac_with_joins"}]}]},{"group":"Search rules","pages":[{"title":"Search rules","sidebarTitle":"Overview","href":"/capabilities/search_rules/overview"},{"title":"Create your first rule","sidebarTitle":"Getting started","href":"/capabilities/search_rules/create_your_first_rule"},{"group":"How to","pages":[{"title":"Pin several documents for a query","href":"/capabilities/search_rules/how_to/pin_multiple_results"},{"title":"Boost documents during a campaign","href":"/capabilities/search_rules/how_to/boost_documents"},{"title":"Deboost documents","href":"/capabilities/search_rules/how_to/deboost_documents"},{"title":"Hide documents from search results","href":"/capabilities/search_rules/how_to/hide_documents"},{"title":"List or filter existing rules","href":"/capabilities/search_rules/how_to/list_and_filter_rules"},{"title":"Pause a rule without deleting it","href":"/capabilities/search_rules/how_to/pause_a_rule"}]},{"group":"Advanced","pages":[{"title":"How search rules work","sidebarTitle":"How search rules work","href":"/capabilities/search_rules/advanced/how_search_rules_work"},{"title":"Specific behaviors","sidebarTitle":"Specific behaviors","href":"/capabilities/search_rules/advanced/specific_behaviors"}]},{"title":"Search rules pricing","sidebarTitle":"Pricing","href":"/capabilities/search_rules/pricing"}]},{"group":"Platform","pages":[{"title":"Meilisearch Cloud platform","sidebarTitle":"Overview","href":"/capabilities/platform/overview"},{"group":"Infrastructure","pages":[{"title":"Cloud infrastructure","sidebarTitle":"Overview","href":"/capabilities/platform/infrastructure/overview"},{"title":"Create a project","href":"/capabilities/platform/infrastructure/create_a_project"},{"title":"Cloud regions","href":"/capabilities/platform/infrastructure/regions"},{"title":"Manage resources","href":"/capabilities/platform/infrastructure/manage_resources"},{"title":"Version management","href":"/capabilities/platform/infrastructure/version_management"},{"title":"Sharding and replication","href":"/capabilities/platform/infrastructure/sharding_and_replication"},{"title":"Backups","href":"/capabilities/platform/infrastructure/backups"}]},{"group":"Monitoring","pages":[{"title":"Monitoring","sidebarTitle":"Overview","href":"/capabilities/platform/monitoring/overview"},{"title":"Search performance","href":"/capabilities/platform/monitoring/search_performance"},{"title":"Indexing performance","href":"/capabilities/platform/monitoring/indexing_performance"},{"title":"Operations","href":"/capabilities/platform/monitoring/usage_metrics"},{"title":"Prometheus endpoint","href":"/capabilities/platform/monitoring/prometheus_endpoint"}]},{"group":"Billing","pages":[{"title":"Billing","sidebarTitle":"Overview","href":"/capabilities/platform/billing/overview"},{"title":"Pricing model","href":"/capabilities/platform/billing/pricing_model"},{"title":"Invoices","href":"/capabilities/platform/billing/invoices"},{"title":"Payment methods","href":"/capabilities/platform/billing/payment_methods"}]},{"group":"Teams","pages":[{"title":"Meilisearch Cloud teams","sidebarTitle":"Overview","href":"/capabilities/platform/teams/overview"},{"title":"Getting started with teams","sidebarTitle":"Getting started","href":"/capabilities/platform/teams/getting_started"},{"group":"How to","pages":[{"title":"Manage team roles","href":"/capabilities/platform/teams/how_to/manage_team_roles"},{"title":"Configure SSO","sidebarTitle":"Configure SSO","href":"/capabilities/platform/teams/how_to/configure_sso_for_team"}]}]},{"group":"Security","pages":[{"title":"Meilisearch Cloud security","sidebarTitle":"Overview","href":"/capabilities/platform/security/overview"},{"title":"Manage the IP allowlist","href":"/capabilities/platform/security/manage_ip_allowlist"},{"title":"Disable the IP allowlist","href":"/capabilities/platform/security/disable_ip_allowlist"}]},{"group":"Management","pages":[{"title":"Project management","sidebarTitle":"Overview","href":"/capabilities/platform/management/overview"},{"title":"Webhooks","href":"/capabilities/platform/management/webhooks"},{"title":"Experimental features","href":"/capabilities/platform/management/experimental_features"}]}]},{"group":"Indexing","pages":[{"title":"Indexing","sidebarTitle":"Overview","href":"/capabilities/indexing/overview"},{"title":"Getting started with indexing","sidebarTitle":"Getting started","href":"/capabilities/indexing/getting_started"},{"group":"How to","pages":[{"title":"Add and update documents","href":"/capabilities/indexing/how_to/add_and_update_documents"},{"title":"Handling multilingual datasets","href":"/capabilities/indexing/how_to/handle_multilingual_data"},{"title":"Document relations","href":"/capabilities/indexing/how_to/document_relations"},{"title":"Export data to another instance","href":"/capabilities/indexing/how_to/export_data"},{"title":"Compact an index","href":"/capabilities/indexing/how_to/compact_an_index"},{"title":"Import large datasets","href":"/capabilities/indexing/how_to/import_large_datasets"},{"title":"Design primary keys","href":"/capabilities/indexing/how_to/design_primary_keys"},{"title":"Edit documents with functions","sidebarTitle":"Edit with functions","href":"/capabilities/indexing/how_to/edit_documents_with_functions"},{"title":"Delete documents at scale","href":"/capabilities/indexing/how_to/delete_documents_at_scale"}]},{"group":"Tasks and batches","pages":[{"title":"Tasks and asynchronous operations","sidebarTitle":"Tasks and asynchronous operations","href":"/capabilities/indexing/tasks_and_batches/async_operations"},{"title":"Working with tasks","sidebarTitle":"Working with tasks","href":"/capabilities/indexing/tasks_and_batches/monitor_tasks"},{"title":"Filtering tasks","sidebarTitle":"Filtering tasks","href":"/capabilities/indexing/tasks_and_batches/filter_tasks"},{"title":"Managing the task database","sidebarTitle":"Paginating tasks","href":"/capabilities/indexing/tasks_and_batches/manage_task_database"}]},{"group":"Joins","pages":[{"title":"Define index relationships","sidebarTitle":"Define index relationships","href":"/capabilities/indexing/joins/define_index_relationships"}]},{"group":"Advanced","pages":[{"title":"Indexing best practices","sidebarTitle":"Indexing best practices","href":"/capabilities/indexing/advanced/indexing_best_practices"},{"title":"Tokenization","sidebarTitle":"Tokenization","href":"/capabilities/indexing/advanced/tokenization"},{"title":"Optimize indexing performance with batch statistics","href":"/capabilities/indexing/tasks_and_batches/optimize_batch_performance"}]}]}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/api/authorization"}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/resources/comparisons/alternatives"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]},"basePath":"","title":"Configure distinct attribute - Meilisearch Documentation","buildId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","deploymentId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","dynamics":[],"chunks":[]}