1{ 2 "index_patterns": ["factory-docs"], 3 "priority": 200, 4 "version": 1, 5 "_meta": { 6 "name": "factory-docs-template", 7 "description": "Index template for the AI Software Factory search index (pages, records, databases). Applied by infrastructure/docker/opensearch-init.sh. Field names must stay in sync with the SearchDocument model in prisma/schema.prisma and the indexer in packages/search." 8 }, 9 "settings": { 10 "index": { 11 "number_of_shards": 1, 12 "number_of_replicas": 1, 13 "refresh_interval": "1s", 14 "analysis": { 15 "analyzer": { 16 "factory_title": { 17 "type": "custom", 18 "tokenizer": "standard", 19 "filter": ["lowercase", "asciifolding"] 20 } 21 } 22 } 23 } 24 }, 25 "mappings": { 26 "dynamic": "false", 27 "properties": { 28 "workspaceId": { "type": "keyword" }, 29 "type": { 30 "type": "keyword", 31 "description": "Document kind: page | record | database | file | comment" 32 }, 33 "title": { 34 "type": "text", 35 "analyzer": "factory_title", 36 "fields": { 37 "keyword": { "type": "keyword", "ignore_above": 512 } 38 } 39 }, 40 "body": { 41 "type": "text" 42 }, 43 "permissions": { 44 "type": "object", 45 "enabled": true, 46 "properties": { 47 "workspaceIds": { "type": "keyword" }, 48 "teamIds": { "type": "keyword" }, 49 "userIds": { "type": "keyword" }, 50 "public": { "type": "boolean" }, 51 "level": { 52 "type": "keyword", 53 "description": "Viewer permission level for this document: VIEW | COMMENT | EDIT | FULL_ACCESS" 54 } 55 } 56 }, 57 "metadata": { 58 "type": "object", 59 "enabled": true, 60 "properties": { 61 "teamId": { "type": "keyword" }, 62 "parentId": { "type": "keyword" }, 63 "createdById": { "type": "keyword" }, 64 "updatedById": { "type": "keyword" }, 65 "isPrivate": { "type": "boolean" }, 66 "isArchived": { "type": "boolean" } 67 } 68 }, 69 "indexedAt": { "type": "date" } 70 } 71 } 72} 73