IPFS search, filter and pagination

Hello together,

I have some questions regarding how to search, filter and paginate data, which is stored in IPFS. Let’s say I have a web application, that want’s to display several images I have stored in IPFS. In this case, I think I need to know the CID of each of these images beforehand. So this has to be hardcoded in the application I think. However, this is not suitable for a large amount of files. The question is, how can I find the files on IPFS without knowing the CID’s beforehand of each file and how can I only query the files I want?

In a traditional database, this would easily be done by several query phrases and I only get back the data I need. How is this typically done with IPFS and especially with the JS library? What I would like to have is some kind of directory, where I maybe only need one CID of the directory and then I can list all of the files under this directory. Is this possible? If yes, can I add/remove files to this directory while still having the same CID of a directory?

I would build indexes with IPLD and query theses, maybe it would work.