Makes no sense to me. Why not have a document for a file and a document for a folder? Or if you must have a single document, why not a field for folder permissions and one for file permissions? The corresponding query would be trivial.
This seems overly complicated and I can't find any justification for it in the article.
The article was maybe a bit too simplistic. What if you have more then one folder? What if a file can be located within a whole tree of folders, just like on a file system? Would the corresponding query still be trivial? Maybe there's a trivial way of doing recursion in elasticsearch?
This seems overly complicated and I can't find any justification for it in the article.