If I'm understanding well, you don't store the attachment in the document but you have to create a pipeline for the attachment and a mapping for other fields. Then you link the attachment to the document you put in the index with the pipeline, right ?
You create the ingest pipeline for attachments (like here)
Then when you create a document you attach the document by adding the "data" field in the list of fields that takes your document (created in step 1) and add the ?pipeline=attachment in the URL.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.