parcel | Lucy |
class variable | LUCY_SORTRULE |
struct symbol | lucy_SortRule |
class nickname | lucy_SortRule |
header file | Lucy/Search/SortRule.h |
Lucy::Search::SortRule – Element of a SortSpec.
SortRules are the building blocks used to assemble SortSpecs; each SortRule defines a single level of sorting. For example, sorting first by “category” then by score requires a SortSpec with two SortRule elements.
lucy_SortRule* // incremented
lucy_SortRule_new(
int32_t type,
cfish_String *field,
bool reverse
);
Create a new SortRule.
Indicate whether to sort by score, field, etc. (The default is to sort by a field.)
The name of a sortable
field.
If true, reverse the order of the sort for this rule.
lucy_SortRule* // incremented
lucy_SortRule_init(
lucy_SortRule *self,
int32_t type,
cfish_String *field,
bool reverse
);
Initialize a SortRule. See new() for a description of the parameters.
cfish_String*
lucy_SortRule_Get_Field(
lucy_SortRule *self
);
Accessor for “field” member.
int32_t
lucy_SortRule_Get_Type(
lucy_SortRule *self
);
Accessor for “type” member.
bool
lucy_SortRule_Get_Reverse(
lucy_SortRule *self
);
Accessor for “reverse” member.
Lucy::Search::SortRule is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.