SearchResultsSorting
Struct for specifying sorting for search results.
Unset (no rules) keeps the default order: by relevance. A request the server cannot sort fails
with "The content can't be sorted across all pages." unless options.allow_resorting_to_default_sort
is set; then the results come in the default order and the response's search status flags have
resorted_to_default_sort. Sorting is not available with SearchFlags.look_in_all_versions.
When more objects match than the vault's sorting limit (20,000 by default), the same rule applies
(resorted_to_default_sort_too_many_results).
| Full name | MFiles.SearchResultsSorting |
|---|---|
| Proto file | mfiles/structs.proto |
Fields
| Field | Type | Number | Description |
|---|---|---|---|
rules | SortRuleValueArray | 1 | The sort rule. Exactly one rule is supported; more than one cannot be sorted. |
options | SortFlags | 2 | Sort flags. Set allow_resorting_to_default_sort to get relevance order instead of an error when the rule cannot be applied. |
Used by methods
- IRPCSearch.GetFolderContents -- Lists the contents of a view or a view level: subviews, grouping folders and objects.
- IRPCSearch.GetFolderContentsOrDelta -- Gets the contents of the specified folder, or a delta that indicates changes to document vault data since the logical timestamp known by the caller.
- IRPCSearch.SearchObjects -- Searches the vault for objects that match the given conditions.
Used in fields
SearchObjectsRequest.sorting-- How to sort the results. Unset sorts by relevance. At most one rule; see SearchResultsSorting.GetFolderContentsOrDeltaRequest.sorting-- If not empty, specifies how search results are being sorted.GetFolderContentsRequest.sorting-- If not empty, specifies how search results are being sorted.