For full text indexing, which is better, tsearch2 or fulltextindex

From: LIANHE SHAO <lshao2(at)jhmi(dot)edu>
To: pgsql-performance(at)postgresql(dot)org
Subject: For full text indexing, which is better, tsearch2 or fulltextindex
Date: 2003-11-26 20:06:02
Message-ID: 4c0ccf4c27ff.4c27ff4c0ccf@jhmimail.jhmi.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi all,
Which one is better (performance/easier to use),
tsearch2 or fulltextindex?
there is an example how to use fulltextindex in the
techdocs, but I checked the contrib/fulltextindex
package, there is a WARNING that fulltextindex is
much slower than tsearch2. but tsearch2 seems
complex to use, and I can not find a good example.
Which one I should use? Any suggestions?

thanks and Regards,
William

----- Original Message -----
From: Hannu Krosing <hannu(at)tm(dot)ee>
Date: Wednesday, November 26, 2003 5:33 pm
Subject: Re: [PERFORM] why index scan not working
when using 'like'?

> Tom Lane kirjutas T, 25.11.2003 kell 23:29:
> > Josh Berkus <josh(at)agliodbs(dot)com> writes:
> > > In regular text fields containing words, your
problem is
> solvable with full
> > > text indexing (FTI). Unfortunately, FTI is
not designed for
> arbitrary
> > > non-language strings. It could be adapted,
but would require a
> lot of
> > > hacking.
> >
> > I'm not sure why you say that FTI isn't a usable
solution. As
> long as
> > the gene symbols are separated by whitespace or
some other non-
> letters> (eg, "foo mif bar" not "foomifbar"), I'd
think FTI would
> work.
> If he wants to search on arbitrary substring, he
could change
> tokeniserin FTI to produce trigrams, so that
"foomifbar" would be
> indexed as if
> it were text "foo oom omi mif ifb fba bar" and
search for things like
> %mifb% should first do a FTI search for "mif" AND
"ifb" and then
> simpleLIKE %mifb% to weed out something like "mififb".
>
> There are ways to use trigrams for 1 and 2 letter
matches as well.
>
> -------------
> Hannu
>
>
> ---------------------------(end of
broadcast)-----------------------
> ----
> TIP 3: if posting/reading through Usenet, please
send an appropriate
> subscribe-nomail command to
majordomo(at)postgresql(dot)org so that
> your message can get through to the mailing
list cleanly
>

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeremiah Jahn 2003-11-26 20:14:11 cross table indexes or something?
Previous Message Richard Huxton 2003-11-26 19:12:01 Re: Followup - expression (functional) index use in joins