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

SQL result set fields should be ordered by the field list

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • 6.3
    • 6.5
    • faceting
    • Windows 8.1, Java 8

    Description

      I'm trying out the Streaming Expressions in Solr 6.3.0.

      Currently, I'm facing the issue of not being able to get the fields in the result-set to be displayed in the same order as what I put in the query.

      For example, when I execute this query:

      http://localhost:8983/solr/collection1/stream?expr=facet(collection1,
      q=":",
      buckets="id,cost,quantity",
      bucketSorts="cost desc",
      bucketSizeLimit=100,
      sum(cost),
      sum(quantity),
      min(cost),
      min(quantity),
      max(cost),
      max(quantity),
      avg(cost),
      avg(quantity),
      count)&indent=true

      I get the following in the result-set.

      {
      "result-set":{"docs":[

      { "min(quantity)":12.21, "avg(quantity)":12.21, "sum(cost)":256.33, "max(cost)":256.33, "count(*)":1, "min(cost)":256.33, "cost":256.33, "avg(cost)":256.33, "quantity":12.21, "id":"000001", "sum(quantity)":12.21, "max(quantity)":12.21}

      ,

      { "EOF":true, "RESPONSE_TIME":359}

      ]}}

      The fields are displayed randomly all over the place, instead of the order sum, min, max, avg as in the query. This may cause confusion to user who look at the output. Possible improvement to display the fields in the result-set in the same order as the query

      Attachments

        1. SOLR-10085.patch
          4 kB
          Joel Bernstein
        2. SOLR-10085.patch
          4 kB
          Joel Bernstein
        3. SOLR-10085.patch
          8 kB
          Joel Bernstein

        Activity

          People

            jbernste Joel Bernstein
            edwinyeozl Edwin Yeo Zheng Lin
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: