View Full Version : Search function without database
Braider
03-31-2011, 08:34 PM
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:confused:
djr33
03-31-2011, 10:04 PM
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.
ddadmin
04-21-2011, 05:05 PM
I recommend Zoom Indexer (http://www.wrensoft.com/zoom/). 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.
devogirl
04-26-2011, 06:28 AM
Never create a content website with more than 5~ pages without the database-stored content.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.