Results 1 to 4 of 4

Thread: Search function without database

  1. #1
    Join Date
    Mar 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Search function without database

    Hi guys,

    I apologise in advance if this has been asked, did a search but didn't find anything exactly on this.

    No less, I have a huge HTML only website which I need to enable a search function on. The challenge is that there is no database, only about 100 pages of html files.

    Client doesn't want Google search, what are our options? Any advice appreciated!

    Braider

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can't do that. You need to convert your site to a database.

    Alternatively you could use google search or event recreate something like google, but that involves a lot of work: you automatically take the content from every HTML page and add it to a database. But you still use a database.

    It is technically possible to skip the database and just use the HTML files, but it would be VERY slow and it just isn't a good idea. But essentially you could loop through all of the files, get their content, and see if you can find the search term. If so, count it as a result. But it will run much less efficiently than a database. And the bigger problem is that when you are dealing with HTML you must somehow ignore the HTML tags when searching. That's why a database helps, too.



    The only alternative to all of this is to create a search engine that doesn't actually use those pages. You could make a parallel (but separate) system. For example, I did this on a site that I made a long time ago. I made HTML pages, and for each one I added a description in the database: I thought of related words and wrote them in a list. Then the search was based on that list (not the page). But it took a lot of time and only worked for that particular site, though even for that I probably wouldn't do it that way again.
    More recently I have used PHP and MySQL to create a full text search engine and it works surprisingly well, and runs very fast.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I recommend Zoom Indexer. It's a very versatile desktop search engine program you use to crawl your HTML pages, with which you then upload the generated index to your site to add the search functionality to it. This is the same search engine we use to power DD for the main pages.
    DD Admin

  4. #4
    Join Date
    Apr 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Never create a content website with more than 5~ pages without the database-stored content.

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
  •