Sort

class Sort(fields: SortField)

Encapsulates sort criteria for returned hits.

A Sort can be created with an empty constructor, yielding an object that will instruct searches to return their hits sorted by relevance; or it can be created with one or more [ ]s.

Since

lucene 1.4

See also

Constructors

Link copied to clipboard
constructor(vararg fields: SortField)
constructor()

Sorts by computed relevance. This is the same sort criteria as calling without a sort criteria, only with slightly more overhead.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(o: Any?): Boolean

Returns true if o is equal to this.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code value for this object.

Link copied to clipboard

Returns true if the relevance score is needed to sort documents.

Link copied to clipboard
fun rewrite(searcher: IndexSearcher?): Sort

Rewrites the SortFields in this Sort, returning a new Sort if any of the fields changes during their rewriting.

Link copied to clipboard
open override fun toString(): String