then

infix fun then(other: SearchSort): SearchSort

Returns a tiered sort consisting of this sort followed by other.

Samples

import com.couchbase.client.kotlin.Cluster
import com.couchbase.client.kotlin.search.Highlight
import com.couchbase.client.kotlin.search.NumericRange
import com.couchbase.client.kotlin.search.SearchFacet
import com.couchbase.client.kotlin.search.SearchQuery
import com.couchbase.client.kotlin.search.SearchResult
import com.couchbase.client.kotlin.search.SearchSort
import com.couchbase.client.kotlin.search.SearchSort.Companion.byField
import com.couchbase.client.kotlin.search.SearchSort.Companion.byId
import com.couchbase.client.kotlin.search.execute
fun main() { 
   //sampleStart 
   // tiered sort
val sort = byField("foo") then byId()

// the same sort, but built from a list
val sameSort = SearchSort.of(listOf(byField("foo"), byId())) 
   //sampleEnd
}