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

PropertyDescriptionValuesMandatory
typefaceted-elementstringYes
enumKeyTypeType of the asset that the facet filters. See supported enumKeyType values.stringYes
enumKeyKey of the filtered asset. Supported values depend on the enumKeyType. For more information, see supported enumKey values.stringYes
defaultCollapsedDetermines whether the list of facets is expanded by default.booleanNo
elementTypeType of the facet in the UI. E.g., a list of checkboxes, or values to select. See supported elementType values.stringNo
iconIdLegacy property. Use icon key instead.integerNo
iconKeyKey of the icon used to visually represent the asset. Use predefined icons from Settings > Configuration > Icons, or define custom ones in the icons asset.stringNo
maxBucketCountThe maximum number of unique values shown in a facet (buckets). For example, up to 100 object types can appear as filter options.integerNo
orderBucketsReverseDetermines whether the order of buckets is reversed.booleanNo
orderBucketsTypeOrder of the search facets (filters) based on a defined order attribute. See supported orderBucketsType values.stringNo
parametersInternal values used to order or identify the facet entries.jsonNo
primaryResultTextDetermines whether the attribute is used as the description of search results. Used mainly for full-text search or facets using text attributes.booleanNo
showSelectAllValuesCheckBoxEnables the select all facets checkbox.booleanNo
subFacetsConfigures 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.jsonNo
titleTranslation 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.stringNo
valuesKeys of assets used as facets. Supported format is asset.type.package_key_asset_key.name .string of objectsNo
valueTypeData type of the facet’s values. Supported values: isBoolean, isText, isTranslationKey, None.stringNo

Supported enumKeyType values

Each facet type supports different facets. See supported enumKey values.

ValueDescription
addRelationFilter objects based on the relation the user wants to add.
applicationFilter objects based on the applications they belong to.
attributeFilter objects based on their attributes.
creatorFilter objects based on the user who created them.
domainTypesFilter objects based on their domain types.
objectTypeFilter objects based on their object types.
relationFilter objects based on their relation types.
spaceFilter objects based on what spaces they belong to.
userAttributeBoosts 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.
userRelationFilter objects based on their user relations.
workflowStateFilter 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 the package_key#attributeTypeKey format) 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 the is_search_type_term feature.
  • userRelation: Key of any user relation type (in the package_key#userRelationTypeKey format) with the is_searchable_attribute feature. 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:

PropertyDescriptionValuesMandatory
boostFieldNamePath 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.stringYes
boostValueNumber added to the text score of every object whose attribute equals the user’s value, for example 1000.integerYes

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

ValueDescription
hiddenFacet is hidden from the UI.
listedValuesValues as selectable tabs. Used specifically for Data Market.
selectBoxDrop-down list of checkboxes. Used specifically for Data Market.
valueListList 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

ValueDescription
attributeType:packageKey_attributeTypeKeyOrders facets based on the value of the attribute.
countOrders facets based on the number of eligible results.
valueDefault. Orders facets according to their values.

The following values are available only for specific combinations of enumKeyType and enumKey:

Enum key typeEnum keyOrder buckets typeDescription
applicationnameKeyorderAttributeOrganizes facets based on their application orderNumber property.
domainTypesnameKeyorderAttributeOrganizes facets based on their domain type orderNumber property.
objectTypenameKeyorderFeatureValueOrganizes facets based on the object type facet_sort_order feature and the object type name.
objectTypenameKeyorderFeatureCountOrganizes facets based on the object type facet_sort_order feature and the number of eligible results.
spacename.keywordorderAttributeOrganizes facets based on their space sortOrder property.