<!-- $XConsortium: dtsrsort.sgm 1996 -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->
<![ %CDE.C.CDE; [<refentry id="CDE.SEARCH.DtSearchSortResults">]]>
<refmeta>
<refentrytitle>DtSearchSortResults</refentrytitle>
<manvolnum>library call</manvolnum>
</refmeta>
<refnamediv><refname><function>DtSearchSortResults</function></refname>
<refpurpose>Sort DtSearch results lists</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;Dt/Search.h></funcsynopsisinfo>
<funcdef>int <function>DtSearchSortResults</function></funcdef>
<paramdef>DtSrResult <parameter>**list</parameter></paramdef>
<paramdef>int <parameter>sort_type</parameter></paramdef>
</funcsynopsis></refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><function>DtSearchSortResults</function> sorts
<symbol role="Variable">lists</symbol> returned from
<function>DtSearchQuery</function>.
</para>
<para>Note that results lists are already presorted by proximity by
<function>DtSearchQuery</function>.
</para>
</refsect1><refsect1>
<title>ARGUMENTS</title>
<variablelist>
<varlistentry><term><symbol role="Variable">list</symbol></term>
<listitem>
<para>Specifies results lists returned from <function>DtSearchQuery</function>.
</para>
</listitem>
</varlistentry>
<varlistentry><term><symbol role="Variable">sort_type</symbol></term>
<listitem>
<para>Specifies the <structname>DtSrResult</structname> sort field. Valid values are:
</para>
<variablelist>
<varlistentry><term><symbol role="Variable">DtSrSORT_PROX</symbol></term>
<listitem>
<para>Sorts in ascending <symbol role="Variable">DtSrResult.proximity</symbol>
order.
</para>
</listitem>
</varlistentry>
<varlistentry><term><symbol role="Variable">DtSrSORT_DATE</symbol></term>
<listitem>
<para>Sorts in descending
<symbol role="Variable">DtSrResult.objdate</symbol> order.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>RETURN VALUE</title>
<para><function>DtSearchSortResults</function> returns <systemitem class="constant">DtSrERROR</systemitem> if
<symbol role="Variable">sort_type</symbol> is invalid. Otherwise, it returns
<systemitem class="constant">DtSrOK</systemitem>.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>&cdeman.DtSrAPI;,
&cdeman.DtSearchQuery;,
&cdeman.DtSearchFreeResults;,
&cdeman.DtSearchMergeResults;
</para>
</refsect1></refentry>

