I am using elastic search mapper-attachment plugin for searching within attachments.
I have a question whether this plugin uploads and stores the file content on the elastic node(in memory) ?
When I hit the search API, I get the encoded document also in the result which tells me that it infact stores the file content.
If yes, then would it not be a replication of data in the file drive and elastic cluster ? for a large number of files it will be a concern since I would have to spend on memory for and storage both .
Is there a way I can only store the search terms extracted from the file ?
You can use source exclude feature for that.
Note that this plugin is deprecated and replaced by ingest-attachment in 5.0.
It's removed in 6.0.