php-doc-en/reference/solr/solrdocument/sort.xml
2010-02-03 13:10:56 +00:00

92 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="solrdocument.sort" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>SolrDocument::sort</refname>
<refpurpose>Sorts the fields in the document</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>SolrDocument::sort</methodname>
<methodparam><type>int</type><parameter>sortOrderBy</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>sortDirection</parameter><initializer>SolrDocument::SORT_ASC</initializer></methodparam>
</methodsynopsis>
<para>
<![CDATA[
The fields are rearranged according to the specified criteria and sort direction
Fields can be sorted by boost values, field names and number of values.
The sortOrderBy parameter must be one of :
* SolrDocument::SORT_FIELD_NAME
* SolrDocument::SORT_FIELD_BOOST_VALUE
* SolrDocument::SORT_FIELD_VALUE_COUNT
The sortDirection can be one of :
* SolrDocument::SORT_DEFAULT
* SolrDocument::SORT_ASC
* SolrDocument::SORT_DESC
The default way is to sort in ascending order.
]]>
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>sortOrderBy</parameter></term>
<listitem>
<para>
The sort criteria.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>sortDirection</parameter></term>
<listitem>
<para>
The sort direction.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->