Ingest-attachment using CBOR sample

Looks like this is still an issue today, more than a year later.

Can you provide a working sample of how to use ingest-attachment with cbor?
I'm struggling with processing large files.


you need to find a library for your progamming language that creates CBOR, so that the whole document including all fields is sent as CBOR, not only the attachment itself.

Does that make sense?


Thank you.

For anyone struggling out there, here's a very basic working python sample, based on this configuration:

PUT _ingest/pipeline/attachment
  "description" : "Extract attachment information",
  "processors" : [
      "attachment" : {
        "field" : "data"


import cbor2
import requests

filename = 'some-file'
headers = {'content-type': 'application/cbor'}

with open(filename, 'rb') as f:
    doc = {

Be aware however that not all clients have support. The python client for example doesn't allow custom headers on the index method ( )

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