Forum Moderators: open

Message Too Old, No Replies

How do I set up a Site Search?

Site Searches

         

Css_Novice

9:28 am on Apr 8, 2006 (gmt 0)

10+ Year Member



I do most of my website designs in CSS and was wondering if anyone could point me in the right direction as the how I can set up an individual website search.

I know how to create a form like so

<form method="post" class="search" action="">
<p><input name="item" class="text" id="item" type="text" />
<input name="search" class="button" value="Search" type="submit" /></p>
</form>

I always thought you had to create a database for all info on your website and direct the search keywords to the db file fields.

Is it possible to do this without creating a db... any assistance is most welcome...

Thanks in advance,

Novice

Matt Probert

12:19 pm on Apr 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes.

A database is a collection of data. Usually in a structured fashion, but not necessarily.

Ergo, your site's HTML pages can be viewed as a database.

A (very) simple search can then be written which will scan the web pages for the search term, and display the page containing the term.

There are numerous free scripts available in Perl and probably other languages for site searching which you can amend to suit your own site.

Matt

Dijkgraaf

11:24 pm on Apr 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use www.freefind.com to index my site and to allow people to search my site.

Css_Novice

5:32 am on Apr 9, 2006 (gmt 0)

10+ Year Member



Thanks guys for your input, I'll check both replies out and see how I go...

Thanks again,
Alan

topr8

7:34 am on Apr 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



imho site search is a waste of time unless very well implemented and you have a large site.

here is the reason:

you'd be amazed at the mis-spellings and other phrases people use in the search box and they get frustrated if zero results keep getting returned.

tedster

7:55 am on Apr 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's a Library thread from 2002 about site search -- but the topics discussed are still important.

Site Search - how to make it a total asset [webmasterworld.com]