How to sort by relevance when searching in a document
Business need
When searching in a document, matching topics appear in the same order as in the document's Table of Contents. It is sometimes useful to sort results by relevance instead.
Overview of the solution
The solution consists in modifying the RewriteArg search query parameter in the Back Office.
Procedure
SaaS users should create a Fluid Topics help desk ticket to request assistance. On-premise users should follow these steps:
-
Access the Back Office.
-
Open the Setup menu and select the Configuration option.
-
In the Front Configuration section, select Front. The Front configuration interface appears with the Search tab opened by default.
-
Enable the Show All toggle.
-
In the Filter search box, start typing rewriteArg to display the rewriteArg option.
-
Select Edit, then select Add.
-
Define a key and a value as follows:
-
Key = afs:sort@FluidTopics=ft:tocPosition,ASC
-
Value = afs:sort@FluidTopics=relevance,DESC
-
-
Select Save, then select I'm done with modifying.
-
Select Publish to apply the new sort order.