Hi,

The CloudSolrStream client (Solr 6.3.0) assumes that the sort param always
have the order.

starting in line 326:

    String[] sorts = sort.split(",");
    StreamComparator[] comps = new StreamComparator[sorts.length];
    for(int i=0; i<sorts.length; i++) {
      String s = sorts[i];

      String[] spec = s.trim().split("\\s+"); //This should take into
account spaces in the sort spec.
      
      String fieldName = spec[0].trim();
      String order = spec[1].trim();

      ....

This code doesn't check that the spec param can be inserted incorrectly like
"id" and not like "id asc|desc" and as a result the spec has only one index.

The CloudSolrStream client returns null without any kind of message warning
the user that the order is mandatory. 



-----
Best regards

/Yago
--
View this message in context: 
http://lucene.472066.n3.nabble.com/CloudSolrStream-client-doesn-t-validate-sort-order-tp4312936.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to