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

IOException when running count(*) query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.10
    • 9.0, 8.11.2
    • Parallel SQL

    Description

      Error message

      java.io.IOException: score is not a valid field for unlimited queries.", 

      To replicate:

      Sample documents:

            {
              "name_s":"Foo",
              "cities_ss":["SFO",
                "NYC"],
              "userid_i":1,
              "id":"1"},
            {
              "name_s":"Bar",
              "cities_ss":["SEA",
                "NYC"],
              "userid_i":2,
              "id":"2"}]
        } 

      Query:

       

      http://localhost:8983/solr/sql_test/sql?qt=/sql&stmt=select count(*) as QUERY_COUNT from sql_test WHERE (userid_i='1') AND (id='1') AND (name_s='Foo')

      fails with

      {
        "result-set": {
          "docs": [
            {
              "EXCEPTION": "Failed to execute sqlQuery 'select count(*) as QUERY_COUNT from sql_test WHERE (userid_i='1') AND (id='1') AND (name_s='Foo')' against JDBC connection 'jdbc:calcitesolr:'.\nCaused by: Error while executing SQL \"select count(*) as QUERY_COUNT from sql_test WHERE (userid_i='1') AND (id='1') AND (name_s='Foo')\": java.io.IOException: score is not a valid field for unlimited queries.",
              "EOF": true,
              "RESPONSE_TIME": 951
            }
          ]
        }
      }
       

      where as if I only use two filters

      http://localhost:8983/solr/sql_test/sql?qt=/sql&stmt=select count(*) as QUERY_COUNT from sql_test WHERE (userid_i='1') AND (id='1') 

      passes

       

      {
        "result-set": {
          "docs": [
            {
              "QUERY_COUNT": 1
            },
            {
              "EOF": true,
              "RESPONSE_TIME": 940
            }
          ]
        }
      }
       

      Attachments

        Activity

          People

            thelabdude Timothy Potter
            kiranch Kiran
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 20m
                2h 20m