Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9495

AIOBE with confusing message for incomplete sort spec in Streaming Expression

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Resolved
    • Affects Version/s: 6.2
    • Fix Version/s: 6.4, 7.0
    • Component/s: search
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None
    • Environment:

      6.2.0_RC1

      Description

      I was thinking of using streaming expressions for something, and started to play around with it, but I made a bonehaded mistake, and got an error that's pretty confusing:

      {"result-set":{"docs":[
      {"EXCEPTION":"1","EOF":true}]}}

      This turns out to be due to:

      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.apache.solr.client.solrj.io.stream.expr.StreamFactory.createInstance(StreamFactory.java:316)
      	... 33 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
      	at org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:334)
      	at org.apache.solr.client.solrj.io.stream.CloudSolrStream.init(CloudSolrStream.java:274)
      	at org.apache.solr.client.solrj.io.stream.CloudSolrStream.<init>(CloudSolrStream.java:181)
      	... 38 more
      

      The mistake I made was omitting a direction from the sort spec. Attaching trivial patch to provide a better error message...

        Attachments

          Activity

            People

            • Assignee:
              joel.bernstein Joel Bernstein
              Reporter:
              gus_heck Gus Heck
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: