You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the datastore module of mongoDB only supports sorting documents by one field. Sorting can be done using the following keys "ASC", "ASCENDING" or "1" for ascending order; "DESC", "DESCENDING" or "-1" for descending order. We should support sorting by multiple fields allowing to pass a list of strings following this nomenclature:
field:order
Example: We want to retrieve all the documents sorted first by a priority value (1-5) in descending order and creation date in ascending order.
QueryOptions options = new QueryOptions(QueryOptions.SORT, Arrays.asList("priority:DESC", "creationDate:ASC"));
The text was updated successfully, but these errors were encountered:
At the moment, the datastore module of mongoDB only supports sorting documents by one field. Sorting can be done using the following keys "ASC", "ASCENDING" or "1" for ascending order; "DESC", "DESCENDING" or "-1" for descending order. We should support sorting by multiple fields allowing to pass a list of strings following this nomenclature:
field:order
Example: We want to retrieve all the documents sorted first by a priority value (1-5) in descending order and creation date in ascending order.
QueryOptions options = new QueryOptions(QueryOptions.SORT, Arrays.asList("priority:DESC", "creationDate:ASC"));
The text was updated successfully, but these errors were encountered: