func NewDocIDSortRule(reverse bool) SortRule { cfObj := C.lucy_SortRule_new(C.lucy_SortRule_DOC_ID, nil, C.bool(reverse)) return WRAPSortRule(unsafe.Pointer(cfObj)) }
func NewScoreSortRule(reverse bool) SortRule { cfObj := C.lucy_SortRule_new(C.lucy_SortRule_SCORE, nil, C.bool(reverse)) return WRAPSortRule(unsafe.Pointer(cfObj)) }
func NewFieldSortRule(field string, reverse bool) SortRule { fieldC := clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false) cfObj := C.lucy_SortRule_new(C.lucy_SortRule_FIELD, (*C.cfish_String)(fieldC), C.bool(reverse)) return WRAPSortRule(unsafe.Pointer(cfObj)) }