Table of Contents

Method Field

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Field(string, bool)

Orders hits by the value of a fast field (one created with fast: true): u64, i64, f64, bool, date, bytes, or text (ordinal, byte-wise order).

public static SortBy Field(string field, bool descending = false)

Parameters

field string

The fast field to sort by.

descending bool

Largest values first. Default false: smallest first.

Returns

SortBy

Remarks

Documents without a value come last in either order. Unless Score() is also a key, relevance isn't computed and Score is NaN. The values sorted by are in SortValues. For a multi-valued field, the first value is used.