Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Sort = [SortSpec]
- data SortSpec
- data DefaultSort = DefaultSort {}
- data SortOrder
- data SortMode
- data Missing
- mkSort :: FieldName -> SortOrder -> DefaultSort
Documentation
The two main kinds of SortSpec
are DefaultSortSpec
and
GeoDistanceSortSpec
. The latter takes a SortOrder
, GeoPoint
, and
DistanceUnit
to express "nearness" to a single geographical point as a
sort specification.
data DefaultSort Source #
DefaultSort
is usually the kind of SortSpec
you'll want. There's a
mkSort
convenience function for when you want to specify only the most
common parameters.
SortOrder
is Ascending
or Descending
, as you might expect. These get
encoded into "asc" or "desc" when turned into JSON.
SortMode
prescribes how to handle sorting array/multi-valued fields.
Missing
prescribes how to handle missing fields. A missing field can be
sorted last, first, or using a custom value as a substitute.