SOLR-789: The javadoc of RandomSortField is not readable

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@699549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2008-09-27 03:45:40 +00:00
parent ac881d9cc6
commit 774153b891
2 changed files with 17 additions and 14 deletions

View File

@ -57,7 +57,7 @@ Build
Documentation
----------------------
1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalevée via koji)

View File

@ -32,27 +32,30 @@ import org.apache.solr.search.function.ValueSource;
/**
* Utility Field used for random sorting. It should not be passed a value.
*
* <p>
* This random sorting implementation uses the dynamic field name to set the
* random 'seed'. To get random sorting order, you need to use a random
* dynamic field name. For example, you will need to configure schema.xml:
*
* <types>
* <pre>
* &lt;types&gt;
* ...
* <fieldType name="random" class="solr.RandomSortField" />
* &lt;fieldType name="random" class="solr.RandomSortField" /&gt;
* ...
* </types>
* <fields>
* &lt;/types&gt;
* &lt;fields&gt;
* ...
* <dynamicField name="random*" type="rand" indexed="true" stored="false"/>
* &lt;dynamicField name="random*" type="rand" indexed="true" stored="false"/&gt;
* ...
* </fields>
* &lt;/fields&gt;
* </pre>
*
* http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_1234%20desc
* http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_2345%20desc
* http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_ABDC%20desc
* http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_21%20desc
*
* Examples of queries:
* <ul>
* <li>http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_1234%20desc</li>
* <li>http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_2345%20desc</li>
* <li>http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_ABDC%20desc</li>
* <li>http://localhost:8983/solr/select/?q=*:*&fl=name&sort=rand_21%20desc</li>
* </ul>
* Note that multiple calls to the same URL will return the same sorting order.
*
* @version $Id$