[FSCrawler] Add data in upload files

Hello,

i create an flask web application in order to add my files into my cluster ES, using fscrawler.

I would like create a section where user could add more informations about this document; I want create a new property in my doc, call "userdata" for example -like a post-it we add on a document-

The problem is I want to be able to do specific search in this property. In fact, i could just add the userdata at the end in my file, then it will be add in content section of the document.

In a nutshell, at the moment i upload with FSCrawler in my cluster: myfile.doc, and i want to add now:

myfile.doc +"properties": {
"userdata": {
"type": "text",
"content": "Hello i am the User and i add my comments
}

Is this possible ?
I hope i was clear, thanks for help :slight_smile:

I have no idea how to approach the problem, because in my app, file is send to fscrawler update url and not data, so i do not know how could i add data above it..

In fact i am not sure it is possible, i would like to have an opinion if you can.

Thanks in advance

That is not supported by FSCrawler but I think that would make a lot of sense to add it.

That has been asked in

But sadly not implemented yet. :frowning:

Hey @dadoonet thanks for reply

Finally, i will just do an update after upload of my document after get his id, then i can add a new field, and how much new data i want

I do the same with python than:

POST test/_doc/1/_update
{
"script" : "ctx._source.new_field = 'value_of_new_field'"
}

It costs to my app a request more, but at least it works :slight_smile:

2 Likes

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