title: How do you perform a solr sql select * statement?
body: <p>This seems like a very simple question, but I have searched google for a long time and have not found any answers. </p>
  
  <p>Specifically I am running into an issue performing a very simple select * sql query using Solr 6.5.0.</p>
  
  <ul>
  <li><strong>Q:</strong> What am I trying to achieve?
  
  <ul>
  <li><strong>A:</strong> Use Solr sql unlimited select statement to select all records in my collection that have "property_1" == 100</li>
  </ul></li>
  <li><p><strong>Q:</strong> What issue am I running into?</p>
  
  <ul>
  <li><strong>A:</strong> When performing the query I receive an error saying "java.io.IOException: score is not a valid field for unlimited queries."</li>
  </ul></li>
  <li><p><strong>Q:</strong> How do I prevent solr from automatically scoring my sql query (I don't care about the score) so I can perform an unlimited sql query and get back all fields in the documents I want?</p>
  
  <ul>
  <li><strong>A:</strong> ????</li>
  </ul></li>
  </ul>
  
  <p>When I perform a solr sql query for all documents in my collection it fails because solr automatically includes a score field in the results and the score field cannot be used in unlimited sql queries. The thing is that my collection does not have a "score" field in it and I did not ask for the results to be scored. From googling around it would seem I get a score field by default from solr, but my reading would suggest that I should only get this if I requested it in my query (which I did not do).</p>
  
  <p>I am using the Solr admin UI to perform the sql query. The following is the exact error message I get:</p>
  
  <pre><code>stmt=select * from TestIndex where property_1 = '100'"
  
  {
    "result-set":{
      "docs":[{
          "EXCEPTION":"Failed to execute sqlQuery 'select * from TestIndex 
  where property_1 = '100'' against JDBC connection 'jdbc:calcitesolr:'.\nError 
  while executing SQL \"select * from TestIndex where property_1 = '100'\": 
  java.io.IOException: score is not a valid field for unlimited queries.",
          "EOF":true,
          "RESPONSE_TIME":172}]}}
  </code></pre>
  
  <p>Now here is the same query except instead of using the above query, I replace the "select *" part with "select FieldA" and get all the records containing "FieldA". This query produces the following result which proves the unlimited sql select works</p>
  
  <pre><code>stmt=select FieldA from TestIndex where property_1 = '100'"
  
      {
    "result-set":{
      "docs":[{
          "FieldA":["AAAA"]}
        ,{
          "FieldA":["AAAA"]}
        ,{
          "FieldA":["AAAA"]}
        ,{
          "EOF":true,
          "RESPONSE_TIME":247}]}}
  </code></pre>
  
  <p>The problem is that I want all fields returned not just FieldA so the above query is useless to me. Also, this is just a POC. In a real world use case specifying all the fields in the sql statement is unrealistic. I would expect the * to work and it seems it would if Solr did not automatically try to provide a score in the unlimited results. So performing the following sql query, while it works, will not be realistic in a real world scenario.</p>
  
  <pre><code>stmt=select FieldA, FieldB, FieldC, FieldD from TestIndex where property_1 = 
  '100'
  </code></pre>
  
  <p>To make things very simple my test collection has 6 documents in it. The following are all the documents. I used the non sql solr /select handler to get this result to show here (which BTW I would expect to be able to perform a solr sql select * to produce the same results as the solr /select *:* like below):</p>
  
  <pre><code>{
      "responseHeader":{
      "zkConnected":true,
      "status":0,
      "QTime":0,
      "params":{
          "q":"*:*",
          "indent":"on",
          "wt":"json",
          "_":"1494587051946"}},
      "response":{"numFound":6,"start":0,"docs":[
      {
          "FieldA":["AAAA"],
          "FieldB":["BBBB"],
          "FieldC":["CCCC"],
          "FieldD":["DDDD"],
          "dateTimestamp":1494591988400,
          "property_1":100,
          "_version_":1567193288840052736},
          {
              "FieldA":["AAAA"],
              "FieldB":["BBBB"],
              "FieldC":["CCCC"],
              "FieldD":["DDDD"],
              "dateTimestamp":1494591988403,
              "property_1":100,
              "_version_":1567193289014116352},
          {
              "FieldA":["AAAA"],
              "FieldB":["BBBB"],
              "FieldC":["CCCC"],
              "FieldD":["DDDD"],
              "dateTimestamp":1494591988404,
              "property_1":100,
              "_version_":1567193289034039296},
          {
              "FieldA":["AAAA"],
              "FieldB":["BBBB"],
              "FieldC":["CCCC"],
              "FieldD":["DDDD"],
              "dateTimestamp":1494591995474,
              "property_1":200,
              "_version_":1567193296256630784},
          {
              "FieldA":["AAAA"],
              "FieldB":["BBBB"],
              "FieldC":["CCCC"],
              "FieldD":["DDDD"],
              "dateTimestamp":1494591995475,
              "property_1":200,
              "_version_":1567193296265019392},
          {
              "FieldA":["AAAA"],
              "FieldB":["BBBB"],
              "FieldC":["CCCC"],
              "FieldD":["DDDD"],
              "dateTimestamp":1494591995476,
              "property_1":200,
              "_version_":1567193296267116544}]
  }}
  </code></pre>
  
  <p>Sorry for the long post. I tried to give all the details.</p>
  
  <p>Any ideas?</p>