| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.V5.Bloodhound.Internal.Sort
- data SortMode
- mkSort :: FieldName -> SortOrder -> DefaultSort
- type Sort = [SortSpec]
- data SortSpec
- data DefaultSort = DefaultSort {}
- data SortOrder
- data Missing
Documentation
SortMode prescribes how to handle sorting array/multi-valued fields.
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.
The ignoreUnmapped, when Just field is used to set the elastic unmapped_type
Constructors
| DefaultSort | |
Fields
| |
Instances
SortOrder is Ascending or Descending, as you might expect. These get
encoded into "asc" or "desc" when turned into JSON.
Constructors
| Ascending | |
| Descending |
Missing prescribes how to handle missing fields. A missing field can be
sorted last, first, or using a custom value as a substitute.
Constructors
| LastMissing | |
| FirstMissing | |
| CustomMissing Text |