I'm looking for some general advice on how to best implement a search engine. All data for the site is stored in a SQLite database. I'm not sure how to go about this.
I'm looking for some general advice on how to best implement a search engine. All data for the site is stored in a SQLite database. I'm not sure how to go about this.
... is a start.Code:SELECT * FROM pages WHERE text LIKE '%query%';
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
LOL, yes I guess that is a start. I'm asking because I can't seem to find very much information. From what I have found it appears the best way is to generate a table full of keywords, then when a user searchs for something count the page with the highest matches. That is easy enough to build, just strip HTML then explode the data, but it seems like it would be ineffecient(it would double the size of the database). If anyone knows of any basic search scripts that I could look at, that would help.
Or if I try and search "on the fly"(maybe using sqlite_create_aggregate and similar_text), it seems like it should take awhile to get a result.
So let me re-phrase my question, of those two methods(or others that I don't know about) what is the best way to search an sqlite database?
Bookmarks