import type { SearchIndexSchema } from "./types.js"; /** * Knowledge-base articles. Powers the public help-center search and the * admin KB-explorer. `slug` is stored but not searchable — it is needed * for URL generation in the loader hot-path. */ export const kbArticlesIndex: SearchIndexSchema = { name: "kb-articles", primaryKey: "id", searchableAttributes: ["title", "summary", "content", "tags"], filterableAttributes: ["tenantId", "knowledgeBaseId", "language", "isPublished", "tags"], sortableAttributes: ["createdAt", "updatedAt", "publishedAt"], rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"], allowedDocumentFields: [ "id", "tenantId", "knowledgeBaseId", "slug", "title", "summary", "content", "tags", "language", "isPublished", "createdAt", "updatedAt", "publishedAt", ], };