Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/search/src/schemas/kb-articles.ts
T

31 lines
894 B
TypeScript

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",
],
};