Обсуждение: Fulltext Index and Search
Hi, ist it possible to make a fulltextsearch about more than one column? Stefan
On Mon, 25 Feb 2002, Stefan Weiss wrote: > Hi, > > ist it possible to make a fulltextsearch about more than one column? contrib/tsearch could do that for you. and it's very fast!
On Tue, 26 Feb 2002, Samuel J. Sutjiono wrote: > Can you share any example showing how it's done ? http://openftx.sourceforge.net/ for myself, i just read the README and it showed how to ALTER TABLE your existing table to add another column with txtidx type. then you can do an UPDATE table SET newcolidx=txt2txtidx(oldtxtcol); and use triggers etc for future updates or inserts. i'm amazed how fast it is. there is no phrase or such though. but it works very well as is. i think openftx also does something with relevancy ranking etc. > > Thanks > ----- Original Message ----- > From: "Thomas T. Thai" <tom@minnesota.com> > To: "Stefan Weiss" <sw@typ1.de> > Cc: <pgsql-general@postgresql.org> > Sent: Tuesday, February 26, 2002 2:22 PM > Subject: Re: [GENERAL] Fulltext Index and Search > > > > On Mon, 25 Feb 2002, Stefan Weiss wrote: > > > > > Hi, > > > > > > ist it possible to make a fulltextsearch about more than one column? > > > > contrib/tsearch could do that for you. and it's very fast! > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > > > --- Thomas T. Thai | Minnesota.com | tom@minnesota.com | 612.220.6220 Visit http://www.minnesota.com/
Can you share any example showing how it's done ? Thanks ----- Original Message ----- From: "Thomas T. Thai" <tom@minnesota.com> To: "Stefan Weiss" <sw@typ1.de> Cc: <pgsql-general@postgresql.org> Sent: Tuesday, February 26, 2002 2:22 PM Subject: Re: [GENERAL] Fulltext Index and Search > On Mon, 25 Feb 2002, Stefan Weiss wrote: > > > Hi, > > > > ist it possible to make a fulltextsearch about more than one column? > > contrib/tsearch could do that for you. and it's very fast! > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >
On Mon, 25 Feb 2002, Stefan Weiss wrote: > ist it possible to make a fulltextsearch about more than one column? In my address book I do the following: - First I replace every space (" ") by a percent sign. - Then I do a select with concatenated columns in the where clause. PHP-Code: $sqlbedingung = "Peter Muster"; $sqlbedingung = str_replace(" ","%",$sqlbedingung); And then a select * from adressen where vorname||nachname ilike '%$sqlbedingung%' You can do it with more columns. -- PGP/GPG Key-ID: http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0xB5A1AFE1