Disabling the Sorting of Search Results by Their Relevance

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:

  1. In M-Files Admin, access the custom vault data section.
    1. Open M-Files Admin.
    2. In the left-side tree view, expand an M-Files server connection.
    3. Expand Document Vaults.
    4. Expand a vault.
    5. Select Configurations.
    6. In the navigation area, expand Custom Vault Data.
  2. Select Namespace Registry > Configuration.
    1. Expand the Namespaces node, select Add Namespace, and expand the newly added namespace node.
    2. In the Group field, enter an internal name of your choice for the group that uses the namespace that you are about to register.
    3. Use the Storage Type drop-down menu and select MFConfigurationValue.
  3. 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.
  4. In the Namespace Description field, enter a description about the purpose of the namespace.
  5. Select Save to save your configuration.
    Your configuration must now be similar to the example shown below:
  6. Expand Named Values and expand the Group name that you have just created.
  7. Expand the Namespace Label that you created earlier and select Configuration.
  8. Expand the Named Values node, select Add Named Value and expand the newly added named value node.
  9. In the Name field, enter the following value: RememberSearchResultsSortingCriteria
  10. In the Value field, enter the following value: true
  11. Select Save to save your configuration.
  12. Optional: If you use the classic M-Files Web, you can also make the following Advanced Vault Settings change on the M-Files.
  13. Go back to your vault Configurations.
  14. In the navigation area, select Advanced Vault Settings.
  15. Open the Configuration tab.
    Result:The advanced vault settings are shown.
  16. Expand the Client option and select its Configuration tab.
  17. 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.
  18. Select Classic Web.
  19. Expand Search from the navigation area.
  20. 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.