Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Download CSV from Saved Search panel fails if Lucene synthax used #57012

Closed
tsullivan opened this issue Feb 6, 2020 · 3 comments · Fixed by #90050
Closed

[Reporting] Download CSV from Saved Search panel fails if Lucene synthax used #57012

tsullivan opened this issue Feb 6, 2020 · 3 comments · Fixed by #90050
Labels
bug Fixes for quality problems that affect the customer experience v7.5.1

Comments

@tsullivan
Copy link
Member

tsullivan commented Feb 6, 2020

Kibana version: 7.5.1

Elasticsearch version:

Server OS version:

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):

Describe the bug:

Steps to reproduce:

  1. Create a saved search with a filter done in Lucene syntax
  2. Add the saved search to a dashboard
  3. Click "Download CSV" from the dashboard panel controls

Expected behavior:
Downloads the CSV immediately

Screenshots:

  • in Discover:

    • image
  • in Dashboard:

    • image
    • image

Logs and errors in Kibana server console:

server    log   [17:35:01.397] [debug][csv_from_savedobject][execute-job][immediate][reporting] Execute job generating [search] csv
server    log   [17:35:01.400] [info][csv_from_savedobject][execute-job][immediate][reporting] Executing job from immediate API
server    log   [17:35:01.498] [debug][csv_from_savedobject][execute-job][immediate][reporting] executing search request
server    log   [17:35:01.508] [error][csv_from_savedobject][execute-job][immediate][reporting] Generate CSV Error! [parsing_exception] [query_string] query does not support [0], with { line=1 & col=141 } :: {"path":"/kibana_sample_data_ecommerce/_search","query":{"scroll":"30s","size":500},"body":"{\"_source\":{\"includes\":[\"order_date\",\"customer_first_name\"]},\"docvalue_fields\":[\"order_date\"],\"query\":{\"bool\":{\"must\":[{\"query_string\":{\"0\":\"{\",\"1\":\" \",\"2\":\"\\\"\",\"3\":\"a\",\"4\":\"n\",\"5\":\"a\",\"6\":\"l\",\"7\":\"y\",\"8\":\"z\",\"9\":\"e\",\"10\":\"_\",\"11\":\"w\",\"12\":\"i\",\"13\":\"l\",\"14\":\"d\",\"15\":\"c\",\"16\":\"a\",\"17\":\"r\",\"18\":\"d\",\"19\":\"\\\"\",\"20\":\":\",\"21\":\" \",\"22\":\"t\",\"23\":\"r\",\"24\":\"u\",\"25\":\"e\",\"26\":\" \",\"27\":\"}\",\"query\":\"Muni*\"}}],\"filter\":[{\"range\":{\"order_date\":{\"format\":\"strict_date_time\",\"gte\":\"2020-01-30T10:35:01-07:00\",\"lte\":\"2020-02-06T10:35:01-07:00\"}}},{\"bool\":{\"must\":[{\"query_string\":{\"query\":\"Muni*\",\"analyze_wildcard\":true,\"time_zone\":\"America/Phoenix\"}}],\"filter\":[{\"match_all\":{}},{\"range\":{\"order_date\":{\"format\":\"strict_date_optional_time\",\"gte\":\"2020-01-30T17:35:01.326Z\",\"lte\":\"2020-02-06T17:35:01.326Z\"}}}],\"should\":[],\"must_not\":[]}}],\"should\":[],\"must_not\":[]}},\"script_fields\":{},\"sort\":[{\"order_date\":{\"order\":\"desc\",\"unmapped_type\":\"boolean\"}},{\"order_date\":{\"order\":\"desc\"}}]}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"parsing_exception\",\"reason\":\"[query_string] query does not support [0]\",\"line\":1,\"col\":141}],\"type\":\"parsing_exception\",\"reason\":\"[query_string] query does not support [0]\",\"line\":1,\"col\":141},\"status\":400}"}
server   error  [17:35:01.338]  Error: [parsing_exception] [query_string] query does not support [0], with { line=1 & col=141 }
    at respond (/Users/tsullivan/elastic/kibana7/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/Users/tsullivan/elastic/kibana7/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/Users/tsullivan/elastic/kibana7/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/Users/tsullivan/elastic/kibana7/node_modules/elasticsearch/node_modules/lodash/lodash.js:4929:19)
    at IncomingMessage.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1103:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)



@tsullivan tsullivan changed the title [Reporting/Csv/Dashboard] Download CSV from Saved Search panel fails if Lucene synthax used [Reporting] Download CSV from Saved Search panel fails if Lucene synthax used Feb 6, 2020
@tsullivan
Copy link
Member Author

Here was the query that Reporting generated:

{
  "body": {
    "_source": {
      "includes": [
        "order_date",
        "customer_first_name"
      ]
    },
    "docvalue_fields": [
      "order_date"
    ],
    "query": {
      "bool": {
        "filter": [
          {
            "range": {
              "order_date": {
                "format": "strict_date_time",
                "gte": "2020-01-30T10:22:59-07:00",
                "lte": "2020-02-06T10:22:59-07:00"
              }
            }
          },
          {
            "bool": {
              "filter": [
                {
                  "match_all": {}
                },
                {
                  "range": {
                    "order_date": {
                      "format": "strict_date_optional_time",
                      "gte": "2020-01-30T17:22:59.570Z",
                      "lte": "2020-02-06T17:22:59.570Z"
                    }
                  }
                }
              ],
              "must": [
                {
                  "query_string": {
                    "analyze_wildcard": true,
                    "query": "Muni*",
                    "time_zone": "America/Phoenix"
                  }
                }
              ],
              "must_not": [],
              "should": []
            }
          }
        ],
        "must": [
          {
            "query_string": {
              "0": "{",
              "1": " ",
              "10": "_",
              "11": "w",
              "12": "i",
              "13": "l",
              "14": "d",
              "15": "c",
              "16": "a",
              "17": "r",
              "18": "d",
              "19": "\"",
              "2": "\"",
              "20": ":",
              "21": " ",
              "22": "t",
              "23": "r",
              "24": "u",
              "25": "e",
              "26": " ",
              "27": "}",
              "3": "a",
              "4": "n",
              "5": "a",
              "6": "l",
              "7": "y",
              "8": "z",
              "9": "e",
              "query": "Muni*"
            }
          }
        ],
        "must_not": [],
        "should": []
      }
    },
    "script_fields": {},
    "sort": [
      {
        "order_date": {
          "order": "desc",
          "unmapped_type": "boolean"
        }
      },
      {
        "order_date": {
          "order": "desc"
        }
      }
    ]
  },
  "index": "kibana_sample_data_ecommerce"
}

@tsullivan tsullivan self-assigned this Feb 6, 2020
@streamich streamich added bug Fixes for quality problems that affect the customer experience Team:Reporting Services v7.5.1 labels Feb 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience v7.5.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants