When clustering documents, it is possible to configure the sort order of variants based on their shared metadata key.
In this use case, documents are available in two versions: "version": "V1" and "version": "V2".
Follow the procedure below to display V2 documents by default:
Add metadata to the Reader page
- Go to the Administration menu, select the Design section, then the Reader tab.
- Open the desired Topic template.
- Add the version metadata using the Topic metadata component. Make sure the "Used for clustering results" option is selected.
- Select Save.
Add metadata to the Search page
- Go to the Administration menu, go to the the Design section and select the Search results tab.
- Open the desired Search page.
- Select the Search results component and open its settings.
- In the "Sort clustered results by metadata" field, add the metadata key used for clustering. In this case
version. - Select Save.
Configure metadata
- In the Administration menu, go to the Portal section and select the Metadata tab.
- Select the
versionmetadata and select the cogwheel to configure the metadata key. - Set the Sort method to Version, and the Sort order to Descending.
- Select Save.