diff --git a/services/search/pkg/opensearch/index.go b/services/search/pkg/opensearch/index.go index ef69cf904..9f36cbaa8 100644 --- a/services/search/pkg/opensearch/index.go +++ b/services/search/pkg/opensearch/index.go @@ -16,8 +16,9 @@ import ( var ( ErrManualActionRequired = errors.New("manual action required") - IndexManagerLatest = IndexIndexManagerResourceV1 + IndexManagerLatest = IndexIndexManagerResourceV2 IndexIndexManagerResourceV1 IndexManager = "resource_v1.json" + IndexIndexManagerResourceV2 IndexManager = "resource_v2.json" ) //go:embed internal/indexes/*.json diff --git a/services/search/pkg/opensearch/internal/indexes/resource_v2.json b/services/search/pkg/opensearch/internal/indexes/resource_v2.json new file mode 100644 index 000000000..64b450ef5 --- /dev/null +++ b/services/search/pkg/opensearch/internal/indexes/resource_v2.json @@ -0,0 +1,56 @@ +{ + "settings": { + "number_of_shards": "1", + "number_of_replicas": "1", + "analysis": { + "analyzer": { + "path_hierarchy": { + "filter": [ + "lowercase" + ], + "tokenizer": "path_hierarchy", + "type": "custom" + } + }, + "tokenizer": { + "path_hierarchy": { + "type": "path_hierarchy" + } + } + } + }, + "mappings": { + "properties": { + "Content": { + "type": "text", + "term_vector": "with_positions_offsets" + }, + "ID": { + "type": "keyword" + }, + "ParentID": { + "type": "keyword" + }, + "RootID": { + "type": "keyword" + }, + "MimeType": { + "type": "wildcard", + "doc_values": false + }, + "Path": { + "type": "text", + "analyzer": "path_hierarchy" + }, + "Deleted": { + "type": "boolean" + }, + "Hidden": { + "type": "boolean" + }, + "Favorites": { + "type": "keyword" + } + } + } +} \ No newline at end of file