# How can Index a Filesystem?

**URL:** <https://discuss.elastic.co/t/how-can-index-a-filesystem/24088>\
**Category:** Elasticsearch\
**Created:** [June 22, 2015, 12:21pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088 "2015-06-22T12:21:41Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![pumacy112](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pumacy112](https://discuss.elastic.co/u/pumacy112)\
**Post date:** [June 22, 2015, 12:21pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/1 "2015-06-22T12:21:41Z")

</div>

In elasticsearch 1.5 are Rivers deprecated. The FSRiver Plugin is not working with ElasticSearch V. 1.6.  
How is a good way to Index a File System (example: C.\temp) without the FSRiver?

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 22, 2015, 12:39pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/2 "2015-06-22T12:39:23Z")

</div>

You will have to use Logstash and File input to grab your files

---

<div class="post-metadata">

**Author:** ![pumacy112](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pumacy112](https://discuss.elastic.co/u/pumacy112)\
**Post date:** [June 22, 2015, 12:48pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/3 "2015-06-22T12:48:33Z")

</div>

It gives a Sample for Index a File System with Logstash?

---

<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 22, 2015, 12:52pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/4 "2015-06-22T12:52:24Z")

</div>

It won't work until we publish a Tika codec plugin IMO.

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 22, 2015, 12:54pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/5 "2015-06-22T12:54:12Z")

</div>

The simplest would be

```auto
input{
file {
   path=>["c:\temp\*"]
}
}
output{
stdout {
codec => "rubydebug"
}
}

```

[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html)

---

<div class="post-metadata">

**Author:** ![pumacy112](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pumacy112](https://discuss.elastic.co/u/pumacy112)\
**Post date:** [June 22, 2015, 12:59pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/6 "2015-06-22T12:59:11Z")

</div>

It is also possible to write the file datas to a own Mapping?

---

<div class="post-metadata">

**Author:** ![pumacy112](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pumacy112](https://discuss.elastic.co/u/pumacy112)\
**Post date:** [June 22, 2015, 1:06pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/7 "2015-06-22T13:06:46Z")

</div>

Is there a good way to do indexing a file system about the Java API from Elasticsearch?

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 22, 2015, 1:08pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/8 "2015-06-22T13:08:12Z")

</div>

Sure you just need to issue a "PUT/POST" request

via any language or even do it with CURL  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html)

---

<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 22, 2015, 1:13pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/9 "2015-06-22T13:13:36Z")

</div>

But what kind of files are you expecting?

---

<div class="post-metadata">

**Author:** ![pumacy112](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pumacy112](https://discuss.elastic.co/u/pumacy112)\
**Post date:** [June 22, 2015, 1:16pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/10 "2015-06-22T13:16:14Z")

</div>

All kind of files are possible. I will scan a File Url like c:\temp. And with Tika Parser parse all file datas and write it to my Index with own Mapping. And i will find out the best method how to do it.  
Its no Documented how can be automatically

---

<div class="post-metadata">

**Author:** ![poonam](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@poonam](https://discuss.elastic.co/u/poonam)\
**Post date:** [July 10, 2015, 5:48am UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/11 "2015-07-10T05:48:50Z")

</div>

HI,  
I have a requirement where I am reading file path from database and fetching files from file server.  
Like KBid=1 KBfilepath="filepath" and KBstatus="ready".  
Now I need to feed file and also other contents like KBID to elasticsearch.  
How do I do this logtash or with river.am using ES1.5.2

---

<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:** [July 10, 2015, 6:19am UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/12 "2015-07-10T06:19:54Z")

</div>

You can't at this moment.  
You need to write your own code IMO.

Or wait for LS tika codec / filter. But it's not there yet.

---

<div class="post-metadata">

**Author:** ![OpenSemanticSearch](https://avatars.discourse-cdn.com/v4/letter/o/a88e57/32.png) [@OpenSemanticSearch](https://discuss.elastic.co/u/OpenSemanticSearch)\
**Post date:** [February 19, 2016, 1:17pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/13 "2016-02-19T13:17:28Z")

</div>

You can use the files connector of Open Semantic Search: [http://www.opensemanticsearch.org/etl/elasticsearch](http://www.opensemanticsearch.org/etl/elasticsearch)

---

<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 5, 2017, 11:14pm UTC](https://discuss.elastic.co/t/how-can-index-a-filesystem/24088/14 "2017-07-05T23:14:55Z")

</div>


