Re: Tsearch

Поиск
Список
Период
Сортировка
От Steve Midgley
Тема Re: Tsearch
Дата
Msg-id 20080612194529.24F622E0038@developer.postgresql.org
обсуждение исходный текст
Ответ на Tsearch  (PostgreSQL Admin <postgres@productivitymedia.com>)
Список pgsql-sql
At 12:20 PM 6/12/2008, pgsql-sql-owner@postgresql.org wrote:
>Date: Thu, 12 Jun 2008 08:47:44 -0400
>From: PostgreSQL Admin <postgres@productivitymedia.com>
>To: pgsql-sql@postgresql.org
>Subject: Tsearch
>Message-ID: <48511AF0.30306@productivitymedia.com>
>
>this is a small sample of the data:
>
>                         short_desc
>|                               long_desc 
>

>----------------------------------------------------------+------------------------------------------------------------------------
>  CHICKEN,BROILERS OR FRYERS,LEG,MEAT&SKN,CKD,FRIED,BATTER | Chicken,
>broilers or fryers, leg, meat and skin, cooked, fried, batter
>
>Is the best method of search through this data full text search via
>tsearch or some other method.  I'm running version 8.3
>
>say I want to search for chicken skin?
>
>Thanks for the advice,
>J

Having previously established myself as a non-expert on TSearch2, I 
hesitate to post, but I think your issue is data semantics more than 
search tool. How do you want your system to handle this psuedo data:

Chicken broilers, pork skins

Should that return a match for "chicken skins" or not? If your data are 
semantically stored such that any record that matches "chicken" and 
also matches "skin" refers to "the skins of chickens" (the actual 
meaning you are looking for), then you're going to have a relatively 
easy time of it.

If not, you'll have to consider ways to code your data so that searches 
behave correctly. You could develop search / coding schemes that say 
things like "find all records with chicken and skin, where the 
following words do not appear between the words chicken and skin: beef, 
pork, cow, pig, etc.."

Just some thoughts for you there.

Best,

Steve



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Harold A. Giménez Ch."
Дата:
Сообщение: Re: COPY command and required file permissions
Следующее
От: "Shavonne Marietta Wijesinghe"
Дата:
Сообщение: Create Table Problem