From: | Rick Schumeyer <rschumeyer(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Full text search strategy for names |
Date: | 2009-04-17 11:02:49 |
Message-ID: | 95b1cc100904170402j1ac9d355n7c473c026a12b53c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You can get extra (undesirable) results, depending on the name. For
example, if you are searching for the last name of "Ricks", you will also
find all authors whose first name is "Rick".
I also noticed that the directions for indexing multiple columns don't seem
to be quite right.
In section 12.2.2:
UPDATE pgweb SET textsearchable_index_col =
to_tsvector('english', coalesce(title,'') || coalesce(body,''));
I found that the last word of title is joined with the first word of body,
which gives strange results. I ended up added a space which gave better
results:
to_tsvector('english', coalesce(title,'') || ' ' || coalesce(body,''));
On Fri, Apr 17, 2009 at 1:04 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Rick Schumeyer <rschumeyer(at)gmail(dot)com> writes:
> > I want to be able to search a list of articles for title words as well as
> > author names. I understand how to do the title words with the full text
> > searching. But I'm not sure the best strategy for the names. The full
> text
> > parser "parses" the names giving undesirable results.
>
> > For example,
>
> > select to_tsvector('claude Jones');
> > to_tsvector
> > --------------------
> > 'jone':2 'claud':1
>
> Er ... why is that a problem? As long as the index stems the words in
> the same way that the query does, why should you care?
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Grzegorz Jaśkiewicz | 2009-04-17 11:06:56 | Re: Full text search strategy for names |
Previous Message | Christian Schröder | 2009-04-17 10:52:30 | Re: Performance of full outer join in 8.3 |