> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Grouping

[localhost link]: http://localhost:3000/docs/5/fusion/getting-data-out/curating-your-search-experience/experience-optimizer/eo-document-grouping

[mintlify link]: https://doc.lucidworks.com/docs/5/fusion/getting-data-out/curating-your-search-experience/experience-optimizer/eo-document-grouping.md

[old doc.lw link]: https://doc.lucidworks.com/fusion/5.9/4jzskx.md

Experience Optimizer makes it easy to group documents together so they can be presented to the user. This can be useful when you want to show several documents that are relevant to each other, for example.

![result list](https://mintcdn.com/lucidworks/aJg00sncwy9AQv3p/assets/images/experience-optimizer/eo-result-list.png?fit=max\&auto=format\&n=aJg00sncwy9AQv3p\&q=85\&s=3eb3b406d5a2114c4881e827fad2ead4)

Document groups can be boosted or blocked. If you want to promote a document group that is new, for example, you can boost the group to the top of the results.

You can still apply rules individually to documents within a group. This allows you to boost a document based on a specific user’s search behavior. If a user that is typically interested in ballet searches for "dance" content, you can boost ballet-related articles to the top of the group.

![ballet boost](https://mintcdn.com/lucidworks/aJg00sncwy9AQv3p/assets/images/experience-optimizer/eo-boost-ballet.png?fit=max\&auto=format\&n=aJg00sncwy9AQv3p\&q=85\&s=6d4e81db2dc41eb3acaa58ac61a52c98)

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

## Best practices

These parameters group documents, and are defined in the Additional Query Parameters Stage:

| Parameter Name | Parameter Value | Update Policy |
| - | - | - |
| group | true | default |
| group.format | grouped | default |
| group.ngroups | true | default |
| group.field | style\_id\_s | default   NOTE: You must configure `groupField=<field>` if you use [App Studio](https://doc.lucidworks.com/docs/5/fusion/dev-portal/appkit/overview.md) to create your search application. |

For more information about adding a query pipeline and additional query parameters, see:

* **Add a Query Pipeline Stage**
* [Additional Query Parameters Stage](https://doc.lucidworks.com/docs/5/fusion/reference/config-ref/pipeline-stages/query-stages/set-query-params-stage.md)

> [accordion] Add a Query Pipeline Stage
>
> In the Query Workbench, click **Add a Stage** to add query pipeline stages that can perform query setup, results relevancy, troubleshooting, and more.
>
> ![Add a stage](https://mintcdn.com/lucidworks/l9y7VqRhZkN9hmR0/assets/images/4.0/query-workbench-stage-add.png?fit=max\&auto=format\&n=l9y7VqRhZkN9hmR0\&q=85\&s=a99d1f4ca656cb61e804ca149e0463e7)
>
> The Solr Query stage is the only pipeline stage that is required for querying processes to complete, and therefore exists in every query pipeline. It is always the last stage in a series.
>
> **See these pages for more information:**
>
> Fusion 5.x:
>
> * [Query Workbench](https://doc.lucidworks.com/docs/5/fusion/intro/ui-tour/query-workbench.md)
> * [query pipeline stages](https://doc.lucidworks.com/docs/5/fusion/reference/config-ref/pipeline-stages/query-stages/overview.md)
> * [Solr Query stage](https://doc.lucidworks.com/docs/5/fusion/reference/config-ref/pipeline-stages/query-stages/solr-query-stage.md)
>
> Fusion 4.x:
>
> * [Query Workbench](https://doc.lucidworks.com/docs/4/fusion-server/concepts/querying/query-workbench.md)
> * [query pipeline stages](https://doc.lucidworks.com/docs/4/fusion-server/reference/pipeline-stages/query/overview.md)
> * [Solr Query stage](https://doc.lucidworks.com/docs/4/fusion-server/reference/pipeline-stages/query/solr-query-stage.md)

### Collapse/Expand parser grouping

The Collapse/Expand parser allows grouping with the following parameters:

| Parameter Name | Parameter Value |
| - | - |
| expand | true |
| enableElevation | true |
| group | false |

> [!NOTE]
>
> See [Collapse and Expand Results](https://solr.apache.org/guide/collapse-and-expand-results.html) for more information.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.