I'm trying to find a pre-built solution for a website that allows users to search through a collection of files stored in a directory called 'secret.' This directory will contain hundreds of PDFs, text files, and HTML files. My idea is to charge users $5 for 20 searches, and once logged in, they'd type a query into a search box that deducts a credit for each search.
When a user searches, I want to return results based on the filenames, stripping out the extensions, and giving some context around the hits—like 200 characters before and after the search term. I want the results displayed in sets of 20, without any hyperlinks to the files themselves. Additional features I'm considering include saving user queries for future reference, supporting fuzzy searches, and implementing a blacklist for certain keywords.
Overall, I want to avoid reinventing the wheel—maybe there's already a tool out there that meets these requirements. Has anyone encountered a solution that could help me achieve this?
4 Answers
If you're considering monetization, affiliate links could work, although it might complicate things. Think about how traffic will come in and how that affects user experience. Also, keep in mind how many users would actually use those links instead of looking directly through your files.
You might want to check out some pre-built search solutions tailored for file indexing and searching. Tools like Elasticsearch could be a good fit since they support fuzzy searches and can be configured to handle various file types. Alternatively, look into creating a simple custom search using Google Custom Search; it might not have all the features you're seeking, but it's user-friendly and low effort. Just make sure to manage the visibility settings of your files if they're sensitive!
You might want to look into using LLMs for indexing your files. It could allow for token-based pricing for users, making it easier to manage costs while providing enhanced search functionalities. Just be prepared for the potential setup time!
Back in the day, we had something called Microsoft Index Server which might be worth a look. It was pretty effective for file searches. If you're up for experimenting, you could find some modern equivalents that offer similar functionality. Just a thought!
Totally relevant! I remember trying out different search engines back then. There's a lot of retro tech lurking around that can inspire current solutions.
That’s a great point! I’ve used Elasticsearch before and it’s quite powerful, especially for handling large datasets. You might need some initial setup, but it’s worth it for the flexibility.