Collapsing results
In Fusion 5.9.13 and up, you can configure this stage to collapse search results based on a field, such asproduct_id
, to group all variations of each item into a single search result.
This is useful for ecommerce sites where you want to show a single product with multiple SKUs or variations.
- Open your query pipeline.
- In the Query Fields stage, select the checkbox under Collapse and Expand Results.
- Under Grouping Field, enter the field name to group by, such as the product ID field.
- Save the query pipeline.
_score
, but you can change this to any field in the index using the options under Group Sort.
For additional collapse options, see the configuration reference below.
Query pipeline stage condition examples
Stages can be triggered conditionally when a script in the Condition field evaluates to true. Some examples are shown below. Run this stage only for mobile clients:Configuration
When entering configuration values in the UI, use unescaped characters, such as
\t
for the tab character. When entering configuration values in the API, use escaped characters, such as \\t
for the tab character.