Filters
A filters limits the number of items displayed in search results. There are three types of filter:
-
Simple filters can be used to display entities with common characteristics (for example, assets of a specific asset type). With a simple filter entities appear in the results only if all defined filters apply to them.
-
Composite filters let you create more advanced searches by grouping multiple simple filters using and/or operators.
-
Fixed filters display the content related to the selected entity and only apply to details pages. You can apply this type of filter to the page entity, or to a related entity.
A fixed filter relies on dynamic data, such as the ID for the entity currently being viewed.
When you add filters, the following limitations apply:
-
You cannot filter an entity by a self relation.
-
You cannot filter an entity by its parents. You can only select children relations of the entity to configure the Search component.
-
You can only filter by relations linked to the entity definitions that you configured in the Search component.
If you select a parent taxonomy value as a filter, the list only shows entities with a relation set to the parent value.
-
Add a Search component to the page.
Add a simple filter
Each simple filter represents a single condition. By default, single conditions that are not nested are resolved using an AND operator. You can change this by clicking Edit .
To add a simple filter:
-
On the Layout tab, click the Search component to open its details page.
-
Click the Filters tab and then click the System tab.
-
Click Add filter .
-
Select the Simple option and then choose one of the following filter types:
-
Definition - to filter on an entity definition only.
-
Property - to filter on a specific entity definition field and value.
-
Relation - to build a filter expression.
-
Selection - to filter on an entity definition selection pool where the entity is stored.
-
-
From the Definition list, select a definition.
-
Based on your choices, configure the additional parameters required for the filter.
-
Click Save.
Add a composite filter
If you want to combine simple filters to create more advanced logic, you can use a composite filter.
Nesting simple filters inside a composite filter causes the nested filters to be evaluated together based on the composite filter’s operator, which can be one of the following:
-
AND operators are only satisfied if all the nested simple filters are satisfied
-
OR operators are satisfied if at least one of the nested simple filters is satisfied.
Every search component that uses filters has a top-level composite filter as standard, using the AND operator. You cannot remove this composite filter, but you can change its operator to OR if required.
To add a composite filter:
-
If you haven't already done so, add the first simple filter.
-
Click Add filter .
-
Select the Composite option.
-
Choose one of the following operators:
-
And - requires both of the adjacent simple filters to be satisfied.
-
Or - requires one or both of the adjacent simple filters to be satisfied.
-
-
Click Save.
-
Add the next simple filter.
-
Repeat steps 2-6 until you've added all the required conditions.
-
Click Save and close.
Add a fixed filter
Use fixed filters to render related content for a selected entity.
To add a fixed filter:
-
On the Layout tab, click the Search component to open its details page.
-
Click the Filters tab and then click the Fixed tab.
-
Click Add fixed filter .
-
In the INPUT section, define the following settings.
Field
Description
Input type
The input type of the filter, which can be Page entity or Related entity.
Relation
For Related entity types, a list of relations defined in your solution.
-
In the FILTERS section, depending on the chosen Input type, fill out the following settings.
-
Click Save.
-
Click Save and close.