From 4210e3b503676206ee9dc22d0f6606e0119ef878 Mon Sep 17 00:00:00 2001 From: Natan Yagudayev Date: Wed, 23 Jul 2025 10:08:04 -0400 Subject: [PATCH] feat(docs): added tips for facetFilters (#2680) --- packages/website/docs/api.mdx | 4 ++++ packages/website/docs/docsearch.mdx | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/website/docs/api.mdx b/packages/website/docs/api.mdx index 2625de39..e553e3f1 100644 --- a/packages/website/docs/api.mdx +++ b/packages/website/docs/api.mdx @@ -133,6 +133,10 @@ in case you want to use different credentials for askAi +:::tip +You can use `facetFilters: ['type:content']` to ensure AskAI only uses records where the `type` attribute is `content` (i.e., only records that actually have content). This is useful if your index contains records for navigation, metadata, or other non-content types. +::: + ## `searchParameters` > `type: SearchParameters` | **optional** diff --git a/packages/website/docs/docsearch.mdx b/packages/website/docs/docsearch.mdx index e156067f..07df139e 100644 --- a/packages/website/docs/docsearch.mdx +++ b/packages/website/docs/docsearch.mdx @@ -274,10 +274,6 @@ docsearch({ -```js - -``` - ```jsx +:::tip +You can use `facetFilters: ['type:content']` to ensure AskAI only uses records where the `type` attribute is `content` (i.e., only records that actually have content). This is useful if your index contains records for navigation, metadata, or other non-content types. +::: + ### Sending events You can send search events to your DocSearch index by passing in the `insights` parameter when creating your DocSearch instance.