By default, M-Files sorts search results by their relevance. For more
information on how document relevance in relation to the search term is determined, see Search result sorting.
This behavior can be prevented so that search results are sorted by user preference instead. Make the
following changes on the M-Files Server computer to prevent search results to be
automatically sorted by their relevance:
-
In M-Files Admin, access the custom vault data
section.
-
Open M-Files Admin.
-
In the left-side tree view, expand an M-Files server
connection.
-
Expand Document Vaults.
-
Expand a vault.
-
Select Configurations.
-
In the navigation area, expand Custom Vault Data.
-
Select .
-
Expand the Namespaces node, select Add Namespace, and expand the newly added namespace node.
-
In the Group field, enter an internal name of your choice
for the group that uses the namespace that you are about to register.
-
Use the Storage Type drop-down menu and select MFConfigurationValue.
-
In the Namespace field, enter the namespace M-Files.Core.Listing.SearchResults, and in the Namespace Label field, enter a custom label for the namespace shown in the Custom Vault Data configuration.
-
In the Namespace Description field, enter a description about
the purpose of the namespace.
-
Select Save to save your configuration.
Your configuration must now be similar to the example shown below:

-
Expand Named Values and expand the Group
name that you have just created.
-
Expand the Namespace Label that you created earlier and select Configuration.
-
Expand the Named Values node, select Add Named Value and expand the newly added named value node.
-
In the Name field, enter the following value: RememberSearchResultsSortingCriteria
-
In the Value field, enter the following value: true
-
Select Save to save your configuration.
- Optional:
If you use the classic M-Files Web, you can also make the following Advanced Vault Settings change on the M-Files.
-
Go back to your vault Configurations.
-
In the navigation area, select Advanced Vault
Settings.
-
Open the Configuration tab.
Result:The advanced vault settings are shown.
-
Expand the Client option and select its
Configuration tab.
-
Select the Yes value from the Manage Client Settings Centrally option.
Result:A new list of options opens, and you can continue with the next steps.
-
Select Classic Web.
-
Expand Search from the navigation area.
-
Enter the property ID in the Default Search Sort Property
ID field.
You can find the property ID used for sorting search results in the Property
Definitions section. For example, to sort documents by name or title, enter the
property ID 0.
M-Files no longer forces search results to be
sorted by their relevance, and therefore users can change the column by which search results are sorted
and the user preference is retained in subsequent searches.