I tried using the _bulk api with the data provided in sample data section. However the bulk API always throwing error. I know earlier it was working like charm. I used fiddler to call _bulk api and attached the file.
This is specific with the log related sample data.
Step1 Error: During the mapping creation this is what i got. Though mapping got saved in index.
#! Deprecation: field [include_in_all] is deprecated, as [_all] is deprecated, and will be disallowed in 6.0, use [copy_to] instead.
Step 2 Error:
{"error":{"root_cause":[{"type":"json_parse_exception","reason":"Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@2b2d58fd; line: 1, column: 3]"}],"type":"json_parse_exception","reason":"Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@2b2d58fd; line: 1, column: 3]"},"status":500}
It would help if you provided the exact error that was returned.
I have modified my question with some more details. I am using localhost:9200/_bulk call
The error message indicates that you have submitted invalid JSON. What do the documents look like?
Exactly, I downloaded the document from elastic site. And pasting few lines from the same in here.
{"index":{"_index":"logstash-2015.05.18","_type":"log"}}
{"@timestamp":"2015-05-18T09:03:25.877Z","ip":"185.124.182.126","extension":"gif","response":"404","geo":{"coordinates":{"lat":36.518375,"lon":-86.05828083},"src":"PH","dest":"MM","srcdest":"PH:MM"},"@tags":["success","info"],"utc_time":"2015-05-18T09:03:25.877Z","referer":"http://twitter.com/error/william-shepherd","agent":"Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1","clientip":"185.124.182.126","bytes":804,"host":"motion-media.theacademyofperformingartsandscience.org","request":"/canhaz/gemini-7.gif","url":"https://motion-media.theacademyofperformingartsandscience.org/canhaz/gemini-7.gif","@message":"185.124.182.126 - - [2015-05-18T09:03:25.877Z] "GET /canhaz/gemini-7.gif HTTP/1.1" 404 804 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1"","spaces":"this is a thing with lots of spaces wwwwoooooo","xss":"","headings":["
Interesting thing is -> if i use same lines and past it in dev tool using _bulk it works.... But its a cumbersome process to load so many lines in Dev tool. There should be easy way out like i use fiddler.
This used to work like a charm with 5.4 version but something broken in current version.