You can use an optional Dgidx flag to change the sort order.

No Dgidx flags are necessary to enable record sorting. If a property or dimension is properly enabled for sorting, it is automatically indexed for sorting.

To change the order in which Dgidx stores records, you can specify a sort order and sort direction (ascending or descending) by using the --sort flag with the following syntax:

--sort "key|dir"

where key is the name of a property or dimension on which to sort and dir is either asc for an ascending order or desc for descending (if not specified, the order will be ascending).

You can also specify multiple sort keys in the format:

--sort "key_1|dir_1||key_2|dir_2||...||key_n|dir_n"

If you specify multiple sort keys, the records are sorted by the first sort key, with ties being resolved by the second sort key, whose ties are resolved by the third sort key, and so on.

Note that if you are using the Oracle Commerce Application Controller (EAC) to control your environment, you must omit the quotation marks from the --sort flag. Instead, use the following syntax:

--sort key_1|dir_1||key_2|dir_2||...||key_n|dir_n

There are no dgraph sort flags. If a property or dimension is properly enabled for sorting when indexed, it is available for sorting when those index files are loaded into the MDEX Engine.

Copyright © Legal Notices