Results 1 to 3 of 3

Thread: Search Engine

  1. #1
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default Search Engine

    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.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    SELECT * FROM pages WHERE text LIKE '%query%';
    ... is a start.
    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!

  3. #3
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •