0

I try to sort by title ascending using solr and Solarium. I do this

$query->addSort('title', $query::SORT_ASC);

But it returns 500 whereas this

$query->addSort('itcreation_dateem_id', $query::SORT_ASC);

succeeds. How is it possible to do the sorting of title?

  • Is your title a string or a number? Coz am assuming itcreation_dateem_id is of type number. – Cool Techie Jun 24 '20 at 13:09
  • 2
    If you're getting a 500 error, the Solr log will tell you why. My guess is that the field type of `title` is not sortable. In addition, to sort by a string, you really want a non-analyzed field type (so not `text`, as that's analyzed and tokenized). – MatsLindh Jun 24 '20 at 13:19

0 Answers0