DtSearchSortResults(library call)

NAME
DtSearchSortResults — Sort DtSearch results lists

SYNOPSIS

#include <Dt/Search.h>
int DtSearchSortResults(
DtSrResult **list,
int sort_type);

DESCRIPTION

DtSearchSortResults sorts lists returned from DtSearchQuery.

Note that results lists are already presorted by proximity by DtSearchQuery.

ARGUMENTS

list
    Specifies results lists returned from DtSearchQuery.

sort_type
    Specifies the DtSrResult sort field. Valid values are:

    DtSrSORT_PROX
        Sorts in ascending DtSrResult.proximity order.

    DtSrSORT_DATE
        Sorts in descending DtSrResult.objdate order.

RETURN VALUE

DtSearchSortResults returns DtSrERROR if sort_type is invalid. Otherwise, it returns DtSrOK.

SEE ALSO

DtSrAPI(3), DtSearchQuery(3), DtSearchFreeResults(3), DtSearchMergeResults(3)