Official Content

Azure CosmosDB does not support ordering unless an index is defined for the properties of the index.

Taken from Azure CosmosDB documentation:

  Note

  An ORDER BY clause that orders by a single property always needs a range index and will fail if the path it references doesn't have one.
  Similarly, an ORDER BY query which orders by multiple properties always needs a composite index.


If the dataview associated with the transaction you are navigating does not have an appropriate index defined, the following specification error is thrown.

error spc0116: Group cannot be ordered by <> in group starting at line. 

Solution

Define an index at the dataview definition, according to the order needed.

The index definition must have the Datastore of type Service in all cases.

image_20221221185254_1_png

Note: GeneXus infers an ordering based on what is explained here.

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant