mirror of https://github.com/apache/lucene.git
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:
parent
ac881d9cc6
commit
774153b891
|
@ -57,7 +57,7 @@ Build
|
|||
|
||||
Documentation
|
||||
----------------------
|
||||
|
||||
1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalevée via koji)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
* <pre>
|
||||
* <types>
|
||||
* ...
|
||||
* <fieldType name="random" class="solr.RandomSortField" />
|
||||
* ...
|
||||
* </types>
|
||||
* <fields>
|
||||
* ...
|
||||
* <dynamicField name="random*" type="rand" indexed="true" stored="false"/>
|
||||
* ...
|
||||
* </fields>
|
||||
* </pre>
|
||||
*
|
||||
* <types>
|
||||
* ...
|
||||
* <fieldType name="random" class="solr.RandomSortField" />
|
||||
* ...
|
||||
* </types>
|
||||
* <fields>
|
||||
* ...
|
||||
* <dynamicField name="random*" type="rand" indexed="true" stored="false"/>
|
||||
* ...
|
||||
* </fields>
|
||||
*
|
||||
* 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$
|
||||
|
|
Loading…
Reference in New Issue