Property description
The defaultFacets property configures facets in a search area (search form).
Minimal JSON
{
"type": "faceted-element",
"enumKeyType": "",
"enumKey": ""
}{
"key": "form",
"template": {
"formId": "form",
"title": "title.recipe.tutorial.search",
"defaultFacets": [
{
"type": "faceted-element",
"title": "title.facet.application",
"enumKeyType": "application",
"enumKey": "#_nameKey",
"elementType": "valueList",
"orderBucketsType": "orderAttribute",
"parameters": [
{
"enumKeyType": "application",
"enumKey": "#_id",
"valueType": "isNumber"
},
{
"enumKeyType": "application",
"enumKey": "#_orderNumber",
"valueType": "isNumber"
}
],
"valueType": "isTranslationKey",
"values": ["application.cust_recipe_tutorial_app.name"],
"subFacets": [
{
"type": "faceted-element",
"title": "title.facet_objectType",
"enumKeyType": "objectType",
"enumKey": "#_nameKey",
"elementType": "valueList",
"orderBucketsType": "value",
"valueType": "isTranslationKey",
"values": [
"object.type.cust_recipe_tutorial_recipe.name"
]
}
]
}
]
}
}Example taken from Search Area Configuration.
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
type | faceted-element | string | Yes |
enumKeyType | Type of the asset that the facet filters. See supported enumKeyType values. | string | Yes |
enumKey | Key of the filtered asset. Supported values depend on the enumKeyType. For more information, see supported enumKey values. | string | Yes |
defaultCollapsed | Determines whether the list of facets is expanded by default. | boolean | No |
elementType | Type of the facet in the UI. E.g., a list of checkboxes, or values to select. See supported elementType values. | string | No |
iconId | Legacy property. Use icon key instead. | integer | No |
iconKey | Key of the icon used to visually represent the asset. Use predefined icons from Settings > Configuration > Icons, or define custom ones in the icons asset. | string | No |
maxBucketCount | The maximum number of unique values shown in a facet (buckets). For example, up to 100 object types can appear as filter options. | integer | No |
orderBucketsReverse | Determines whether the order of buckets is reversed. | boolean | No |
orderBucketsType | Order of the search facets (filters) based on a defined order attribute. See supported orderBucketsType values. | string | No |
parameters | Internal values used to order or identify the facet entries. | json | No |
primaryResultText | Determines whether the attribute is used as the description of search results. Used mainly for full-text search or facets using text attributes. | boolean | No |
showSelectAllValuesCheckBox | Enables the select all facets checkbox. | boolean | No |
subFacets | Configures an additional facet level for more precise filtering. Subfacets are configured the same way as the parent facet. For example, a facet that lets you select individual applications can list each application’s object types as a subfacet, such as Business Glossary, Business Term, Business Indicator, or Business Rule. | json | No |
title | Translation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section. | string | No |
values | Keys of assets used as facets. Supported format is asset.type.package_key_asset_key.name . | string of objects | No |
valueType | Data type of the facet’s values. Supported values: isBoolean, isText, isTranslationKey, None. | string | No |
Supported enumKeyType values
Each facet type supports different facets. See supported enumKey values.
| Value | Description |
|---|---|
addRelation | Filter objects based on the relation the user wants to add. |
application | Filter objects based on the applications they belong to. |
attribute | Filter objects based on their attributes. |
creator | Filter objects based on the user who created them. |
domainTypes | Filter objects based on their domain types. |
objectType | Filter objects based on their object types. |
relation | Filter objects based on their relation types. |
space | Filter objects based on what spaces they belong to. |
userAttribute | Boosts objects in results based on the attribute of the user searching a keyword. For example, if the user has the “Engineering” attribute, the search prioritizes objects with the keyword “Engineering” in the specified attribute type. |
userRelation | Filter objects based on their user relations. |
workflowState | Filter objects based on the workflow states they are in. |
Supported enumKey values
There are multiple types of facets and their values that you can select. Below, you’ll find what facets (enumKey) are selectable for each facet type (enumKeyType).
addRelation: Not available for custom packages.application:#_nameKey: Facet contains names of applications.#_id: Facet contains IDs of applications. Used as a parameter.#_orderNumber: Used as a parameter to define the order of facet values.
attribute: Key of any attribute type (in thepackage_key#attributeTypeKeyformat) with one of the following features:is_search_type_term,is_search_type_text,is_search_type_bool.creator:#_id: Facet contains a boolean (true/false) filter used to show only objects created by a logged-in user.
domainTypes:#_nameKey: Facet contains names of domain types.#_id: Facet contains IDs of domain types. Used as a parameter.#_orderNumber: Used as a parameter to define the order of facet values.
objectType:#_nameKey: Facet contains names of object types.#_id: Facet contains IDs of object types. Used as a parameter to define the order of facet values.
relation: Not available for custom packages.space:#_name.keyWord: Facet contains names of spaces.#_isPublic: Facet contains a boolean (true/false) filter to show objects in a public space.#_id: Facet contains IDs of spaces. Used as a parameter.#_sortOrder: Used as a parameter to define the order of facet values.
userAttribute: Key of an attribute type containing the values which are also used as user attributes. The attribute type must have theis_search_type_termfeature.userRelation: Key of any user relation type (in thepackage_key#userRelationTypeKeyformat) with theis_searchable_attributefeature. Facet will contain names of users.workflowState:#_nameKey: Facet contains workflow states.#_id: Facet contains IDs of workflow states. Used as a parameter.
Boosting results by a user attribute
A userAttribute facet raises objects whose attribute matches the user who is searching. It uses two more properties:
| Property | Description | Values | Mandatory |
|---|---|---|---|
boostFieldName | Path to the value in the user’s attributes that the objects are matched against, for example $.Unit[0] (the first value of the user’s Unit attribute). Index paths like [0] are supported. | string | Yes |
boostValue | Number added to the text score of every object whose attribute equals the user’s value, for example 1000. | integer | Yes |
The boost is additive. It decides ties and near-ties in favor of the user’s own segment, but objects from other segments are still returned and a much better text match can still rank higher. A facet without boostFieldName or boostValue boosts nothing.
The facet applies to full-text search in the UI and to the Model Context Protocol (MCP) tools search_text and search_fulltext. MCP reads the facets from the core_fulltext_search_form search form; search_fulltext reads them from the form named by its formId, which is the same form by default. A userAttribute facet sent by the caller does not add a second boost.
A user who has no such attribute, or whose attributes do not contain the configured path, gets no boost and no error: the results are the same as without the facet. An unknown enumKey boosts nothing either.
Supported elementType values
| Value | Description |
|---|---|
hidden | Facet is hidden from the UI. |
listedValues | Values as selectable tabs. Used specifically for Data Market. |
selectBox | Drop-down list of checkboxes. Used specifically for Data Market. |
valueList | List of checkboxes. |
Hidden facets with preset values
A hidden facet that has values works as a fixed filter the user cannot see or change:
- Advanced search, medium search and the Data Market page send the preset values with every search request.
- Clearing the filters (the clear button or Clear all) does not remove them.
- In advanced and medium search, they are not counted in the filter count on the tab. The Data Market page shows no filter count.
- Mini search, used in pickers such as the add-relation picker, does not apply hidden preset values. They are not sent, so they do not filter the results there.
Supported orderBucketsType values
| Value | Description |
|---|---|
attributeType:packageKey_attributeTypeKey | Orders facets based on the value of the attribute. |
count | Orders facets based on the number of eligible results. |
value | Default. Orders facets according to their values. |
The following values are available only for specific combinations of enumKeyType and enumKey:
| Enum key type | Enum key | Order buckets type | Description |
|---|---|---|---|
application | nameKey | orderAttribute | Organizes facets based on their application orderNumber property. |
domainTypes | nameKey | orderAttribute | Organizes facets based on their domain type orderNumber property. |
objectType | nameKey | orderFeatureValue | Organizes facets based on the object type facet_sort_order feature and the object type name. |
objectType | nameKey | orderFeatureCount | Organizes facets based on the object type facet_sort_order feature and the number of eligible results. |
space | name.keyword | orderAttribute | Organizes facets based on their space sortOrder property. |