3

I would like to index in a Elastic instance the files (mainly images) from an upload directory. I'm using the FOSElastica bundle for Symfony 4.

Now I know how to do this by having a Doctrine Image entity, and I succesfully created virtual properties and a bunch of other things like indexing metadata from the image file itself like that on a previous project, who already had a "gallery" database.

But now I'm on a new project which don't use a database for the uploaded images, I just have a main upload directory, and would like to work on indexing the images with their filename and relative subdirectories names.

FOSElastica seems to mandatory ask for a ORM as a persistence mode. I'm not looking either for the attachment functionnality: The files themselves are the type, filepath and possibly metadatas are indexed. Finally, I'm not looking for indexing the content either, like we would with a .doc or .pdf files for example...

Is there a simplier implementation I'm overlooking? Or should I do a database table after all (and play with the filesystem and CRON jobs to populate the index) even if it's just a bridge to FOSELastica?

Thanks!

Jackano
  • 61
  • 3
  • I have the same problem ... I think it didn't stop. After researching, you should not be ready to use the new plugin that incorporates Elasticsearch natively (ingest), just the old one (mapper). I also wouldn't know very well how to update PDFs if they vary. It seems that the only solution is to play with different listeners and CRON tasks. I hope someone enlightens us. – crespo5 Apr 23 '20 at 15:58

0 Answers0