SearchResultsSorting

View as Markdown

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 nameMFiles.SearchResultsSorting
Proto filemfiles/structs.proto

Fields

FieldTypeNumberDescription
rulesSortRuleValueArray1The sort rule. Exactly one rule is supported; more than one cannot be sorted.
optionsSortFlags2Sort flags. Set allow_resorting_to_default_sort to get relevance order instead of an error when the rule cannot be applied.

Used by methods

Used in fields