Files
HiveGrid-Wireframes/hivegrid-cloud/packages/search/src/schemas/tasks.ts
T

44 lines
1.1 KiB
TypeScript

import type { SearchIndexSchema } from "./types.js";
/**
* Tasks (AK-P4b). Only list/filter-relevant fields are indexed; reminders,
* watchers and source internals stay in Postgres. The estate-wide `hivegrid-`
* Meili prefix (infra STANDARDS §4) is applied at the runtime adapter layer, so
* the schema name here stays unprefixed like the other indexes.
*/
export const tasksIndex: SearchIndexSchema = {
name: "tasks",
primaryKey: "id",
searchableAttributes: ["title", "description"],
filterableAttributes: [
"tenantId",
"status",
"priority",
"createdByUserId",
"assignedToUserId",
"assignedToGroupId",
"linkedEntityType",
"linkedEntityId",
"archived",
],
sortableAttributes: ["createdAt", "updatedAt", "deadline"],
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
allowedDocumentFields: [
"id",
"tenantId",
"title",
"description",
"status",
"priority",
"createdByUserId",
"assignedToUserId",
"assignedToGroupId",
"linkedEntityType",
"linkedEntityId",
"archived",
"createdAt",
"updatedAt",
"deadline",
],
};