# Search froma a pdf file content

**URL:** <https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254>\
**Category:** Elasticsearch\
**Created:** [June 23, 2020, 12:22pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254 "2020-06-23T12:22:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romy\_Bobby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romy_bobby/32/50393_2.png) [@Romy\_Bobby](https://discuss.elastic.co/u/Romy_Bobby)\
**Post date:** [June 23, 2020, 12:22pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/1 "2020-06-23T12:22:44Z")

</div>

Hi,

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/0/805a976f29803106395e71cbf4d4e6734bc3d7ab.png)  
I have created a trail account in ES ,installed the elastic search package and configured it.  
to Insert the file i have converted it to base64 format and indexed and created a type . the file can be retrieved from the api console in elastic cloud using search url since i have indexed using keywords .  
But for my need i need to search the content from the file which is in base64 format.  
please help me here .

---

<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:** [June 23, 2020, 12:39pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/2 "2020-06-23T12:39:09Z")

</div>

Did you install the [ingest attachment plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html) and followed the example in the plugin guide?

There an example here: [https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html)

```auto
PUT _ingest/pipeline/attachment
{
  "description" : "Extract attachment information",
  "processors" : [
    {
      "attachment" : {
        "field" : "data"
      }
    }
  ]
}
PUT my_index/_doc/my_id?pipeline=attachment
{
  "data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
}
GET my_index/_doc/my_id

```

The `data` field is basically the BASE64 representation of your binary file.

You can also use [FSCrawler](https://fscrawler.readthedocs.io). There's [a tutorial](https://fscrawler.readthedocs.io/en/latest/user/tutorial.html) to help you getting started.

---

<div class="post-metadata">

**Author:** ![Romy\_Bobby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romy_bobby/32/50393_2.png) [@Romy\_Bobby](https://discuss.elastic.co/u/Romy_Bobby)\
**Post date:** [June 23, 2020, 12:55pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/3 "2020-06-23T12:55:57Z")

</div>

the insgest plug in installed by the below api ??  
PUT \_ingest/pipeline/attachment  
{  
"description" : "Extract attachment information",  
"processors" : [  
{  
"attachment" : {  
"field" : "data"  
}  
}  
]  
}

this can be run in api console right. and needed "value" key . yes i have run the end point in api console. i have run it in this formatt

PUT \_ingest/pipeline/attachment  
{  
"description" : "Extract attachment information",  
"processors" : [  
{  
"set" : {  
"field" : "data",  
"value" :"boo"  
}  
}  
]  
}

I did insert my base64 file in "data" key word and still i am not able to search the file content

---

<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:** [June 23, 2020, 1:24pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/4 "2020-06-23T13:24:47Z")

</div>

> the insgest plug in installed by the below api ??

No. You need to install it from the cloud interface.

---

<div class="post-metadata">

**Author:** ![Romy\_Bobby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romy_bobby/32/50393_2.png) [@Romy\_Bobby](https://discuss.elastic.co/u/Romy_Bobby)\
**Post date:** [June 23, 2020, 1:40pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/5 "2020-06-23T13:40:47Z")

</div>

i am not able to find the installation set up in cloud interface can you guide me

---

<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:** [June 23, 2020, 2:03pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/6 "2020-06-23T14:03:31Z")

</div>

Go to the "Edit" page of the cluster.  
You should see in the page this part:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/f/ef9cc2ade283aa85d5d5c4d87d9302c9b8ce21e8.png)

Just click on the Manage text and activate the plugin.

---

<div class="post-metadata">

**Author:** ![Romy\_Bobby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romy_bobby/32/50393_2.png) [@Romy\_Bobby](https://discuss.elastic.co/u/Romy_Bobby)\
**Post date:** [June 24, 2020, 2:06pm UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/7 "2020-06-24T14:06:49Z")

</div>

thank you, worked file content search perfectly it was the issue with plug in

---

<div class="post-metadata">

**Author:** ![Romy\_Bobby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romy_bobby/32/50393_2.png) [@Romy\_Bobby](https://discuss.elastic.co/u/Romy_Bobby)\
**Post date:** [June 25, 2020, 6:05am UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/8 "2020-06-25T06:05:46Z")

</div>

hi how can we do a partial search of words irrespective of CASE , PLURALS etc eg: if i search for a key "sh" all words in a file with sh and SH should be found in search

---

<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:** [June 25, 2020, 8:28am UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/9 "2020-06-25T08:28:54Z")

</div>

Could you open another question for this?

---

<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:** [July 23, 2020, 8:29am UTC](https://discuss.elastic.co/t/search-froma-a-pdf-file-content/238254/10 "2020-07-23T08:29:01Z")

</div>

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