# FIlesearch using fscrawler

**URL:** <https://discuss.elastic.co/t/filesearch-using-fscrawler/99753>\
**Category:** Elasticsearch\
**Created:** [September 7, 2017, 6:09pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753 "2017-09-07T18:09:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramon\_Zaro](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ramon\_Zaro](https://discuss.elastic.co/u/Ramon_Zaro)\
**Post date:** [September 7, 2017, 6:09pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/1 "2017-09-07T18:09:58Z")

</div>

Hi all, this is with ref. to this now closed thread.

> [@Filesearch solution using ES 5.5.0](https://discuss.elastic.co/t/filesearch-solution-using-es-5-5-0/94377/13):
>
> any pointers how to retrive fields from fscrawler pipeline ?? I have barely no experience with Painless. But it's pretty well documented here: [Painless Scripting Language | Elasticsearch Reference [5.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/modules-scripting-painless.html)

in a nutshell, I am trying to build a filesearch solution using fscrawler but faced a problem of explosion of meta.\* fields.

First the good news, simply putting raw\_metadata to 'false' in \_settings json, takes care of the metadata issue.

However, I am trying to restrict the indexing to specific filetypes, something like

```auto
-
-
"includes" : ["*.txt"],
"includes" : ["*.doc"],
"includes" : ["*.docx"],
"includes" : ["* .pdf"],
"includes" : ["*.rtf"],
-
-

```

I find that the index only has files of the last file.extension (in this case \*.rtf). I tried this multiple times with same result. is this a bug or am I doing something wrong ?

edit : hmm, the forum SW has removed all the ["\*.filetype"] except the last one, I wonder why.

---

<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:** [September 7, 2017, 8:08pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/2 "2017-09-07T20:08:03Z")

</div>

Could you try something like:

```auto
"includes" : ["*.txt", "*.doc", "*.docx", "*.pdf", "*.rtf"]

```

---

<div class="post-metadata">

**Author:** ![Ramon\_Zaro](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ramon\_Zaro](https://discuss.elastic.co/u/Ramon_Zaro)\
**Post date:** [September 8, 2017, 1:13pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/3 "2017-09-08T13:13:05Z")

</div>

didn't work. fsxrawler didn't run after throwing a java exception.

something like :  
"... unexpected character ," at line... etc"

(sorry, I am on a different PC right now. and can't access a copy of the error msg)

---

<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:** [September 8, 2017, 2:14pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/4 "2017-09-08T14:14:37Z")

</div>

Weird.

Could you try then:

```
"includes" : ["*.txt,*.doc,*.docx,*.pdf,*.rtf"]
```

---

<div class="post-metadata">

**Author:** ![Ramon\_Zaro](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ramon\_Zaro](https://discuss.elastic.co/u/Ramon_Zaro)\
**Post date:** [September 15, 2017, 2:16pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/5 "2017-09-15T14:16:53Z")

</div>

it runs but no files are indexed, only folder locations.

I think this looks for a file with the entire string inside " ".

---

<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:** [September 15, 2017, 3:49pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/6 "2017-09-15T15:49:54Z")

</div>

Could you open an issue?

---

<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:** [October 13, 2017, 3:54pm UTC](https://discuss.elastic.co/t/filesearch-using-fscrawler/99753/7 "2017-10-13T15:54:39Z")

</div>

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