import type { SearchIndexSchema } from "./types.js"; /** * Files (AK-P4a). Only list/filter-relevant fields are indexed; the file bytes, * storage keys and scan 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 filesIndex: SearchIndexSchema = { name: "files", primaryKey: "id", searchableAttributes: ["displayName", "notes", "tags"], filterableAttributes: ["tenantId", "mimeType", "tags", "createdByUserId", "assignedToUserId", "archived"], sortableAttributes: ["createdAt", "updatedAt", "sizeBytes"], rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"], allowedDocumentFields: [ "id", "tenantId", "displayName", "notes", "tags", "mimeType", "createdByUserId", "assignedToUserId", "archived", "createdAt", "updatedAt", "sizeBytes", ], };