Unfortunately search is something that is extremely efficient when centralized but very inefficient when distributed.
A few years ago I was very interested in IPFS but once I learned about the limitations it was pretty much not suitable for me. If you really insist on using IPFS then your best bet would be to have a central tracker host an IPNS based site and publish its database index as a series of json files. The javascript client will then have to query the index on its own in the browser.
The alternative would be to download the entire database and create a local index. In theory that's not a bad idea but over time your database will grow to several gigabytes. That's not comparable to just going to whatever site exist today and submitting a search term but it could be highly resilient.
The fundamental problem is that untrusted nodes can't provide search services. It's possible that they end up redirecting you to a fake listing. Blockchain style consensus doesn't work for something that requires responses immediately like a search engine.
Also bittorrent trackers are slightly more complicated than just a file store
A few years ago I was very interested in IPFS but once I learned about the limitations it was pretty much not suitable for me. If you really insist on using IPFS then your best bet would be to have a central tracker host an IPNS based site and publish its database index as a series of json files. The javascript client will then have to query the index on its own in the browser.
The alternative would be to download the entire database and create a local index. In theory that's not a bad idea but over time your database will grow to several gigabytes. That's not comparable to just going to whatever site exist today and submitting a search term but it could be highly resilient.
The fundamental problem is that untrusted nodes can't provide search services. It's possible that they end up redirecting you to a fake listing. Blockchain style consensus doesn't work for something that requires responses immediately like a search engine.
Also bittorrent trackers are slightly more complicated than just a file store