Solr
  1. Solr
  2. SOLR-2955

Distributed grouping throws IllegalStateException when querying with group.sort=score desc

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.5, 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: search
    • Environment:

      Mac OS X 10.7.2
      Java version "1.6.0_29"
      Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
      Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

      Description

      To reproduce:

      This will log

      Dec 8, 2011 10:01:23 AM org.apache.solr.common.SolrException log
      SEVERE: java.lang.IllegalStateException: All required fields must be set
      	at org.apache.solr.search.grouping.distributed.command.TopGroupsFieldCommand$Builder.build(TopGroupsFieldCommand.java:94)
      	at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:291)
      	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
      	.
      	.
      

      For other (legal) values of group.sort or without the shards parameter, the query succeeds.

      1. SOLR-2955.patch
        2 kB
        Steffen Elberg Godskesen
      2. SOLR-2955.patch
        3 kB
        Martijn van Groningen

        Activity

        Steffen Elberg Godskesen created issue -
        Hide
        Steffen Elberg Godskesen added a comment - - edited

        This patch adds a failing unit test

        Show
        Steffen Elberg Godskesen added a comment - - edited This patch adds a failing unit test
        Steffen Elberg Godskesen made changes -
        Field Original Value New Value
        Attachment SOLR-2955.patch [ 12506599 ]
        Martijn van Groningen made changes -
        Assignee Martijn van Groningen [ martijn.v.groningen ]
        Hide
        Martijn van Groningen added a comment -

        Thanks for reporting this issue Steffen!
        I've attached a fix (4.0) for this issue. I also changes your test case a bit. Basically I'm not asserting the response, because this isn't possible when sorting by score in a sharded environment. It just runs the query and checks if the query runs without errors.

        Show
        Martijn van Groningen added a comment - Thanks for reporting this issue Steffen! I've attached a fix (4.0) for this issue. I also changes your test case a bit. Basically I'm not asserting the response, because this isn't possible when sorting by score in a sharded environment. It just runs the query and checks if the query runs without errors.
        Martijn van Groningen made changes -
        Attachment SOLR-2955.patch [ 12506676 ]
        Hide
        Martijn van Groningen added a comment -

        This issue effects Solr from version 3.5

        Show
        Martijn van Groningen added a comment - This issue effects Solr from version 3.5
        Martijn van Groningen made changes -
        Affects Version/s 3.5 [ 12317876 ]
        Affects Version/s 3.6 [ 12319065 ]
        Description
        To reproduce:

        * Start example configuration from 3.6 or 4.0 distribution, and add example .xml documents to index
        * Query: http://localhost:8983/solr/select?q=*:*&sort=id%20asc&group=true&group.sort=score%20desc&group.field=manu_id_s&shards=localhost:8983/solr

        This will log

        {noformat}
        Dec 8, 2011 10:01:23 AM org.apache.solr.common.SolrException log
        SEVERE: java.lang.IllegalStateException: All required fields must be set
        at org.apache.solr.search.grouping.distributed.command.TopGroupsFieldCommand$Builder.build(TopGroupsFieldCommand.java:94)
        at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:291)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
        .
        .
        {noformat}

        For other (legal) values of group.sort or without the shards parameter, the query succeeds.
        To reproduce:

        * Start example configuration from 3.6 or 4.0 distribution, and add example .xml documents to index
        * Query: http://localhost:8983/solr/select?q=*:*&sort=id%20asc&group=true&group.sort=score%20desc&group.field=manu_id_s&shards=localhost:8983/solr

        This will log

        {noformat}
        Dec 8, 2011 10:01:23 AM org.apache.solr.common.SolrException log
        SEVERE: java.lang.IllegalStateException: All required fields must be set
        at org.apache.solr.search.grouping.distributed.command.TopGroupsFieldCommand$Builder.build(TopGroupsFieldCommand.java:94)
        at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:291)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
        .
        .
        {noformat}

        For other (legal) values of group.sort or without the shards parameter, the query succeeds.
        Hide
        Martijn van Groningen added a comment -

        Committed to trunk and 3x.

        Show
        Martijn van Groningen added a comment - Committed to trunk and 3x.
        Martijn van Groningen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.6 [ 12319065 ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 2h 49m 1 Martijn van Groningen 09/Dec/11 13:50
        Resolved Resolved Closed Closed
        517d 20h 50m 1 Uwe Schindler 10/May/13 11:40

          People

          • Assignee:
            Martijn van Groningen
            Reporter:
            Steffen Elberg Godskesen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development