Module: Filters

Configure the Filters Module

To support sorting other than the default order index, extend available sort codes:

extend enum SearchOrderBy {


DESC at the end means it should sort descending whereas ASC or neither direction means it will sort ascending. Underscores will be replaced by dots before firing to the MongoDB, so "metapriceRangesminSimulatedPrice_DESC" this effectively translates to:

{ $sort: { "meta.priceRanges.minSimulatedPrice": -1, "_id": 1 } }
Edit on GitHub