I have custom coded a content management system which basically organizes articles into categories. Each article is represented by a text file which is analogous to a database record. I normally use PHP/MySQL but I opted to use text files here for my own reasons. Each text file has the same format, and stores the title, author, date, article text, and a few other fields. So anyhow, I would like to add search functionality to the site. Here are my thoughts so far:
-
First I would have some function/routine that would take all the text files, and create some kind of super large index file.
-
Then there would be a routine that could search this index file and return the best matching articles.
3) Alternately I could create a routine to export all of the articles to MySQL, and the website would use MySQL solely for the purpose of the search function.
Any thoughts or ideas?
Thanks!