You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.0 version.
Indexed values are sorted lexicographically, but sorting is not applied until you request it by using one of the appropriate methods:
To get ordered results we need to indicate a field name to sort by:
List<FileHeader> results = await session.Query() .OrderBy(x => x.Name) .ToListAsync();
You can also retrieve results in descending order:
List<FileHeader> results = await session.Query() .OrderByDescending("Owner") // order descending by "Owner" metadata .ToListAsync();