lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yago Riveiro <>
Subject CloudSolrStream client doesn't validate sort order
Date Sat, 07 Jan 2017 20:41:27 GMT

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

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message