# Searching local files/folders to test elastic search

**URL:** <https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531>\
**Category:** Elasticsearch\
**Created:** [December 14, 2020, 4:39am UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531 "2020-12-14T04:39:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robo20](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@robo20](https://discuss.elastic.co/u/robo20)\
**Post date:** [December 14, 2020, 4:39am UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531/1 "2020-12-14T04:39:30Z")

</div>

Is there a simple way to do full text search on a bunch of files in various formats (e.g. PDF, EPUB, TXT, DOC) - on locally connected storage? I see the connectors for the cloud services, I just want to do local search. 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 14, 2020, 7:36am UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531/2 "2020-12-14T07:36:04Z")

</div>

You can use the [ingest attachment plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html).

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 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:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 14, 2020, 8:48pm UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531/3 "2020-12-14T20:48:55Z")

</div>

FYI there's no way to currently do this with Enterprise Search, just traditional Elasticsearch and something like David's suggestion (which is why I moved it 🙂 ).

---

<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 15, 2020, 4:13am UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531/4 "2020-12-15T04:13:49Z")

</div>

Actually there's a pending PR to connect FSCrawler to Workplace Search. Which is what I'd have answered if I knew the original question in #enterprise-search:workplace-search 😉

> <https://github.com/dadoonet/fscrawler/pull/991>

I wrote about it in the advent calendar: [Dec 5th, 2020: [EN] Searching anything, anywhere with Workplace Search](https://discuss.elastic.co/t/dec-5th-2020-en-searching-anything-anywhere-with-workplace-search/254740)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 15, 2020, 4:36am UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531/5 "2020-12-15T04:36:55Z")

</div>

Ahh, thanks mate 🙂

---

<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:** [January 12, 2021, 4:36am UTC](https://discuss.elastic.co/t/searching-local-files-folders-to-test-elastic-search/258531/6 "2021-01-12T04:36:56Z")

</div>

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