title: Sort the search result in ascending order of a multivalued field in Solr
body: <p>I'm using Solr of <code>version 6.6.0</code>. I have a schema of title (text_general), description(text_general), id(integer). When I search for a keyword to list the results in ascending order of the title my code returns an error <strong>can not sort on multivalued field: title.</strong> </p>
  
  <p>I have tried to set the sort using the following 3 methods</p>
  
  <pre><code>SolrQuery query = new SolrQuery();
  1. query.setSort("title", SolrQuery.ORDER order);
  2. query.addSort("title", SolrQuery.ORDER order);
  3. SortClause ab = new SolrQuery.SortClause("title", SolrQuery.ORDER.asc);
     query.addSort(ab);
  </code></pre>
  
  <p>but all of these returns the same error</p>
  
  <p>I found a solution by referring to this <a href="https://stackoverflow.com/questions/54091121/sort-the-solr-search-result-give-error-can-not-sort-on-multivalued-field-name">answer</a></p>
  
  <p>It says to use min/max functions. 
  query.setSort(field("pageTitle",min), ORDER.asc);
  this what I'm trying to set as the query, I didn't understand what are the arguments used here.</p>
  
  <p>This is the maven dependency that I'm using </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.apache.solr&lt;/groupId&gt;
      &lt;artifactId&gt;solr-solrj&lt;/artifactId&gt;
      &lt;version&gt;6.5.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>