Need help with debugging

#1

I am getting a parsing error. Could you see what I could be doing wrong? Thanks!

PUT /_template/flightdata_template
{
"index_patterns": ["flightdata*"],
"mappings" : {
"_doc" : {
"dynamic": "strict",
"properties" : {
"thedate": {
"type": "date",
"format": "yyyy.mm.dd HH:mm:ss"},
"airline": { "type": "text" },
"flight": { "type": "text" },
"origin": { "type": "text" },
"destination": { "type": "text" }
}
}
},
"aliases": {
"flightdata": {}
}
}

GET /_template/flightdata_template

POST /flightdata_1/_doc -H "content-type: application/json" -d @-
{
"Thedate": "2017.10.01 15:00:00",
"airline": "HA",
"flight": "1",
"origin": "LAX",
"destination": "HNL"
}

(David Pilato) #2

Maybe Thedate should the thedate?

What is the error message ?

BTW could you please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

#3

Below is the error code. I will read the guide. Sorry about that.

{
  "error": {
    "root_cause": [
      {
        "type": "not_x_content_exception",
        "reason": "not_x_content_exception: Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse",
    "caused_by": {
      "type": "not_x_content_exception",
      "reason": "not_x_content_exception: Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
    }
  },
  "status": 400
}
(David Pilato) #5

This does not look like a Kibana dev console command. How are you executing the code exactly ?

#6

I am using Kibana DEV Console. The command earlier worked with curl. Since my new elastic instance has https ..the curl command had issues with SSL protocol. So I switched to Console. Is the console syntax for POST different?

(David Pilato) #7

It should be:

POST /flightdata_1/_doc
(system) closed #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.