RE: [PHP] building a search engine
| From: | Pushkar Pradhan | Date: | Tue, 06 Aug 2002 02:46:31 +0000 |
| Subject: | RE: [PHP] building a search engine | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111319@lists.php.net to get a copy of this message | ||
I am also interested in building similar feature, what type of database
would you suggest? Isn't MySQL good enough? Is PostgreSQL better, does PHP
work with it?
> I think you could look for such a library already designed. Lots
of > people tried and many succeeded. If you do it for learning then it is
> one thing, but if you need this quality feature then start looking for
> searching systems and cut their codes without reinventing the wheels.
>
> One suggestion - PostgreSQL will probably do this job slightly better as
> it supports a rather more complex SQL.
>
>
> Sincerely,
>
> Maxim Maletsky
>
> PHP Beginner
> www.phpbeginner.com
>
>
> > -----Original Message-----
> > From: Justin French [mailto:justin@indent.com.au]
> > Sent: Tuesday, August 06, 2002 4:33 AM
> > To: php
> > Subject: [PHP] building a search engine
> >
> > Hi,
> >
> > I've done a bit of a google on building a search engine, and found
> some
> > nice
> > stuff, but a helluva lot of crap (the guy on phpbuilder.com storing
> text
> > in
> > BLOBs was the funniest!!).
> >
> > Basically I'm at the very humble beginnings of being able to search a
> > single
> > table column for a single word or phrase.
> >
> > eg:
> >
> > <?
> > $search_phrase = "foo" (or "foo bah")
> >
> > $sql = "SELECT * FROM whateverTable WHERE whateverCol LIKE
> > '%{$search_phrase}%'";
> > ?>
> >
> > That's all fine, but I want to be able to deal with multiple words
> > [splitting on space] and exact phrases [wrapped in quotes] (and
> > combinations
> > of the two) eg:
> >
> > 1. 'foo bah'
> > split into two words, documents containing both get higher
> relevance
> >
> > 2. '"foo bah"'
> > search for exact phrase (already have that working)
> >
> > 3. 'foo "foo bah"'
> > combination of 1 and 2
> >
> >
> > I'm also keen to learn about grading relevance across multiple tables,
> > multiple columns, etc etc.
> >
> >
> > It seems like a HUGE task, but I'm probably missing some key MySQL
> feature,
> > or some trick that makes everything easier.
> >
> >
> > If someone could point me to the RIGHT tutorials/articles or manual
> pages,
> > or drop a few hints I'd be greatful -- but i'm not after a huge chunk
> of
> > code at all -- just the theory.
> >
> >
> > Justin French
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-Pushkar S. Pradhan