Re: PHP search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, June 26, 2005 8:13 pm, Bruce Gilbert said:
> I am fairly new to PHP, and I am looking to create a search
> functionality on a website using php. Can anyone point me to a good
> tutorial that can walk me through this?

Your best bets are:

Use http://google.com and add "site:example.com" as one of the search
terms.  That restricts Google to ONLY return results from the website
example.com

Use htdig to index your site.

A really really really distant third is to roll your own search engine. 
There are innumerable gothcas to it to start with, and unless you better
define what you want your search engine to do, what features you want it
to support, there isn't much we can do to advise you.

Here's an example:

Frequently, websites have an "advanced" search and a "simple" search.

It's usually clear to the beginning programmer that the "advanced" search
a very complicated bit of interaction between multiple search keys, and
requires a fair amount of complex business logic in the program.

What's often not as clear is that the "simple" search is often *WORSE* 
It's only "simple" for the *USER*, not necessarily for your programming. 
If your application has any kind of structure to its data more complex
than an amoeba-like table, then depending on what the user inputs, you
should probably be choosing entirely different fields/values and
algorithms to get your results.  "simple" search means simple for the
surfer, not for the coding.

YMMV
NAIAA

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux