HomeDev guideAPI ReferenceGraphQL
Dev guideUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket


Order the document results.



The Optimizely Graph .NET Client is in beta. Contact your Customer Success Manager for information.

Use the OrderBy method in TypeQueryBuilder to order your result. The method OrderBy() has the following parameters:

  • OrderMode – An enumerator that sorts the value of a field in DESC (descending) or ASC (ascending) order.
  • Ranking – An enumerator used for sorting on scores. It contains the values RELEVANCE, SEMANTIC, BOOST_ONLY, and DOC. For how to use these options, see Optimizely Graph OrderBy .

You can order by multiple fields, for example:

var query = queryBuilder
  .OrderBy(x=>x.Property1, OrderMode.ASC, Ranking.BOOST_ONLY)
  .OrderBy(x=>x.Property2, OrderMode.DESC)