title: Is there any workaround for sorting on multiValued field?
body: <blockquote>
    <p>Sorting can be done on the "score" of the document, or on any multiValued="false" indexed="true" field provided that field is either non-tokenized (ie: has no Analyzer) or uses an Analyzer that only produces a single Term (ie: uses the KeywordTokenizer)</p>
  </blockquote>
  
  <p>docs:- <a href="http://wiki.apache.org/solr/CommonQueryParameters#sort" rel="nofollow">http://wiki.apache.org/solr/CommonQueryParameters#sort</a></p>
  
  <p>My original schema is (You can consider the following is a GROUP-BY) :-</p>
  
  <ul>
  <li>products (id, unique)
  <ul>
  <li>users who make some comments(multiValued)</li>
  <li>last_comment_date for each user (multiValued, one user can make multiple comments, but only the last comment date is captured)</li>
  </ul></li>
  </ul>
  
  <p>If sorting on multiValued is allowed,<br>
  I can easily get list of the products commented by certain users,<br>
  then sort by last_activity_date.</p>
  
  <p>However, it does not work.<br>
  The workaround I have currently is to reverse the schema to :-</p>
  
  <ul>
  <li>user + product (as id, unique)</li>
  <li>user (single value)</li>
  <li>last_comment_date</li>
  <li>products</li>
  </ul>
  
  <p>Which mean I (sort of) manage to get list of the products commented by certain users,<br>
  order by last_comment_date,<br>
  of course it lead to <strong>duplication of products</strong><br>
  as product will appear in each of the user's comment.</p>
  
  <p>Any suggestion to simulate a group-by effect.</p>
  
  <p>Between, I using solr 3.1.<br>
  Field collapsing does not apply.</p>