: I see this in StandardRequestHandler.  However I am wondering if there
: are multiple sorts, where in Solr is this handled?  Thanks.

In Lucene, instances of the Sort class can contain multiple "SortField"
objects, which contain information about the type of sorting (score,
string, integer) the field name to sort on (if not type score) and the
ordering to use (increasing of decreasing)

QueryParsing.parseSort (which is a Solr class) takes care of building up
that Sort object from a string like "inStock asc, score desc"


: ------------------------------------------
:
: // If the first non-query, non-filter command is a simple sort on an indexed 
field, then
:       // we can use the Lucene sort ability.
:       Sort sort = null;
:       if (commands.size() >= 2) {
:         QueryParsing.SortSpec sortSpec = 
QueryParsing.parseSort(commands.get(1), req.getSchema());
:         if (sortSpec != null) {
:           sort = sortSpec.getSort();
:           // ignore the count for now... it's currently only controlled by 
start & limit on req
:           // count = sortSpec.getCount();
:         }
:       }
:
:



-Hoss

Reply via email to