diff --git a/docs/content-services/search-filter.component.md b/docs/content-services/search-filter.component.md index 0251cb713d..8e3b1eece2 100644 --- a/docs/content-services/search-filter.component.md +++ b/docs/content-services/search-filter.component.md @@ -61,12 +61,15 @@ A typical configuration is shown below: { "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" }, { "query": "NOT cm:creator:System" } ], - "facetFields": [ + "facetFields": { + "expanded": true, + "fields": [ { "field": "content.mimetype", "mincount": 1, "label": "Type" }, { "field": "content.size", "mincount": 1, "label": "Size" }, { "field": "creator", "mincount": 1, "label": "Creator" }, { "field": "modifier", "mincount": 1, "label": "Modifier" } - ], + ] + }, "facetQueries": { "label": "My facet queries", "pageSize": 4, diff --git a/lib/core/app-config/schema.json b/lib/core/app-config/schema.json index 8907614c6b..40c65baf1c 100644 --- a/lib/core/app-config/schema.json +++ b/lib/core/app-config/schema.json @@ -568,37 +568,48 @@ } }, "facetFields": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ "field", "mincount", "label" ], - "properties": { - "field": { - "type": "string", - "description": "This specifies the facet field." - }, - "mincount": { - "type": "number", - "description": "This specifies the minimum count required for a facet field to be included in the response. The default value is 1." - }, - "label": { - "type": "string", - "description": "This specifies the label to include in place of the facet field." - }, - "prefix": { - "type": "string", - "description": "This restricts the possible constraints to only indexed values with a specified prefix." - }, - "limit": { - "type": "number", - "description": "Maximum number of results" - }, - "pageSize": { - "type": "number", - "description": "Display page size" - }, - "offset": { "type": "integer" } + "type": "object", + "required": ["fields"], + "properties": { + "expanded": { + "description": "Toggles expanded state of the facet field", + "type": "boolean" + }, + "fields": { + "description": "List of custom facet fields", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ "field", "mincount", "label" ], + "properties": { + "field": { + "type": "string", + "description": "This specifies the facet field." + }, + "mincount": { + "type": "number", + "description": "This specifies the minimum count required for a facet field to be included in the response. The default value is 1." + }, + "label": { + "type": "string", + "description": "This specifies the label to include in place of the facet field." + }, + "prefix": { + "type": "string", + "description": "This restricts the possible constraints to only indexed values with a specified prefix." + }, + "limit": { + "type": "number", + "description": "Maximum number of results" + }, + "pageSize": { + "type": "number", + "description": "Display page size" + }, + "offset": { "type": "integer" } + } + } } } },