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

    • Flags:
      Patch

      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...

        Activity

        Hide
        gus_heck Gus Heck added a comment -

        patch vs 6_x

        Show
        gus_heck Gus Heck added a comment - patch vs 6_x
        Hide
        gus_heck Gus Heck added a comment -

        Patch provides an error message like:

        {"result-set":{"docs":[
        {"EXCEPTION":"Invalid sort spec:id","EOF":true}]}}
        Show
        gus_heck Gus Heck added a comment - Patch provides an error message like: { "result-set" :{ "docs" :[ { "EXCEPTION" : "Invalid sort spec:id" , "EOF" : true }]}}
        Hide
        joel.bernstein Joel Bernstein added a comment -

        Thanks Gus, looks good. We should get this in for 6.3.

        Show
        joel.bernstein Joel Bernstein added a comment - Thanks Gus, looks good. We should get this in for 6.3.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 61676188d7f592f697933b6051806c0bc55b406a in lucene-solr's branch refs/heads/master from Joel Bernstein
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6167618 ]

        SOLR-9495: AIOBE with confusing message for incomplete sort spec in Streaming Expression

        Show
        jira-bot ASF subversion and git services added a comment - Commit 61676188d7f592f697933b6051806c0bc55b406a in lucene-solr's branch refs/heads/master from Joel Bernstein [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6167618 ] SOLR-9495 : AIOBE with confusing message for incomplete sort spec in Streaming Expression
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 832d02bf494c8fea02398db31b55de4314f2be8a in lucene-solr's branch refs/heads/master from Joel Bernstein
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=832d02b ]

        SOLR-9495: Update CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit 832d02bf494c8fea02398db31b55de4314f2be8a in lucene-solr's branch refs/heads/master from Joel Bernstein [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=832d02b ] SOLR-9495 : Update CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ecac79b4e5ab75261bd604f8a874a4c38653146a in lucene-solr's branch refs/heads/branch_6x from Joel Bernstein
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ecac79b ]

        SOLR-9495: AIOBE with confusing message for incomplete sort spec in Streaming Expression

        Show
        jira-bot ASF subversion and git services added a comment - Commit ecac79b4e5ab75261bd604f8a874a4c38653146a in lucene-solr's branch refs/heads/branch_6x from Joel Bernstein [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ecac79b ] SOLR-9495 : AIOBE with confusing message for incomplete sort spec in Streaming Expression
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit a7bb14b6cd9bcb91b2a53d30d6463b86afd39c52 in lucene-solr's branch refs/heads/branch_6x from Joel Bernstein
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a7bb14b ]

        SOLR-9495: Update CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit a7bb14b6cd9bcb91b2a53d30d6463b86afd39c52 in lucene-solr's branch refs/heads/branch_6x from Joel Bernstein [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a7bb14b ] SOLR-9495 : Update CHANGES.txt
        Hide
        joel.bernstein Joel Bernstein added a comment - - edited

        Thanks Gus Heck!

        Show
        joel.bernstein Joel Bernstein added a comment - - edited Thanks Gus Heck !

          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:

              Development