Companion

object Companion

Functions

Link copied to clipboard
fun by(sorts: List<String>): SearchSort
fun by(firstSort: String, vararg remainingSorts: String): SearchSort

Specifies the sort order using strings. Syntax is described by Sorting With Strings

Link copied to clipboard
fun byField(field: String, type: FieldType = FieldType.AUTO, mode: Mode = Mode.DEFAULT, missing: Missing = Missing.LAST, direction: Direction = Direction.ASCENDING): SearchSort
Link copied to clipboard
fun byGeoDistance(field: String, location: GeoPoint, unit: GeoDistanceUnit = GeoDistanceUnit.METERS, direction: Direction = Direction.ASCENDING): SearchSort
Link copied to clipboard
fun byId(direction: Direction = Direction.ASCENDING): SearchSort
Link copied to clipboard
fun byScore(direction: Direction = Direction.DESCENDING): SearchSort
Link copied to clipboard
fun of(sorts: List<SearchSort>): SearchSort

Concatenates sorts into a single SearchSort, for when it's convenient to build a sort from a list instead of using then.