Project Lucy has retired. For details please refer to its Attic page.
Lucy::Search::SortSpec – C API Documentation
Apache Lucy™

Lucy::Search::SortSpec

parcel Lucy
class variable LUCY_SORTSPEC
struct symbol lucy_SortSpec
class nickname lucy_SortSpec
header file Lucy/Search/SortSpec.h

Name

Lucy::Search::SortSpec – Specify a custom sort order for search results.

Description

By default, searches return results in order of relevance; SortSpec allows you to indicate an alternate order via an array of SortRules.

Fields you wish to sort against must be sortable.

For a stable sort (important when paging through results), add a sort-by-doc rule as the last SortRule.

Functions

new
lucy_SortSpec*
lucy_SortSpec_new(
    cfish_Vector *rules
);

Create a new SortSpec.

rules

An array of SortRules.

init
lucy_SortSpec*
lucy_SortSpec_init(
    lucy_SortSpec *self,
    cfish_Vector *rules
);

Initialize a SortSpec.

rules

An array of SortRules.

Inheritance

Lucy::Search::SortSpec is a Clownfish::Obj.