Inserting PDF's and PPT's into 5.1.1 failing ingest attachment - not_x_content_exception

Guys

I'm stuck....

I'm trying to index some PDF's and PPT's in Elastic as follows

curl -H 'Content-Type: application/pdf' -XPUT https://????.eu-west-1.aws.found.io:9243/aggregator/doc/7?pipeline=attachment --data-binary @ixluokdn000991d90edmxwa1.pdf

and get the following response

{
"error": {
"root_cause": [
{
"type": "not_x_content_exception",
"reason": "Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
}
],
"type": "not_x_content_exception",
"reason": "Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
},
"status": 500
}

It works fine if the content is a base64 string....

I've tried reading the docs but for some reason I cannot see where I am going wrong

Thanks in advance

Darren

Hi @maddazzaofdudley,

I've moved this to the Elasticsearch forum as it's more related to ingesting data than cloud.

Christian

You can't upload a binary doc as is to elasticsearch but you need to provide a json document as explained in the docs.

Note that FSCrawler project is coming soon with such an upload feature.

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