# Best way to use Ingest Attachment Plugin

**URL:** https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884
**Category:** Elasticsearch
**Tags:** ingest-pipeline
**Created:** [December 3, 2021, 11:49am UTC](https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884 "2021-12-03T11:49:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sp7980](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sp7980](https://discuss.elastic.co/u/sp7980)
#### Post date: [December 3, 2021, 11:49am UTC](https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884/1 "2021-12-03T11:49:20Z")

</div>

I am trying to setup ES for indexing document content for full text search. The document types that will be indexed are .docx and pdf.

Looks like ingest attachment plugin is to be used for this purpose and I've had a read of various articles including this post - [How to specify file to Ingest Attachment](https://discuss.elastic.co/t/how-to-specify-file-to-ingest-attachment/75843)

From what I understand, the plugin only takes bas64 encoded data for indexing and DOES NOT take an actual file "as-is"? I assumed that the fact that it uses Apache Tika meant that it has the capability to extract content from these doc types, so my question is, is there a way to actually send a file directly to this plugin or not?

thanks.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 3, 2021, 1:44pm UTC](https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884/2 "2021-12-03T13:44:39Z")

</div>

No it's not possible.

But you can instead use FSCrawler project for that. It can read from your filesystem or you can start its rest interface and "upload" your document to FSCrawler.

---

<div class="post-metadata">

### Author: ![sp7980](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sp7980](https://discuss.elastic.co/u/sp7980)
#### Post date: [December 3, 2021, 2:08pm UTC](https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884/3 "2021-12-03T14:08:27Z")

</div>

Thank you for your reply.

So is Apache Tika used to extract content from the base64 encoded data which is sent to it? Just trying to figure out the use of Apache Tika by this plugin. Thank you.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 3, 2021, 9:31pm UTC](https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884/4 "2021-12-03T21:31:39Z")

</div>

That's correct.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 31, 2021, 9:32pm UTC](https://discuss.elastic.co/t/best-way-to-use-ingest-attachment-plugin/290884/5 "2021-12-31T21:32:27Z")

</div>

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