Re: Searching for substring with tsearch(1/2)

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Searching for substring with tsearch(1/2)
Дата
Msg-id 1071048862.3194.39.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Re: Searching for substring with tsearch(1/2)  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: Searching for substring with tsearch(1/2)  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Teodor Sigaev kirjutas K, 10.12.2003 kell 11:20:
> >>Tsearch was never minded as prefix search, and index structure doesn't support 
> >>any kind of prefix or suffix. But you can write extension to tsearch, which will 
> >>search by prefix. But such solution wiil not use index, only sequence scan.
> > 
> > 
> > How efficient would tsearch be for really big expressions (where 'hu%'
> > would be expanded (using a btree word index on one column word table) to
> > tsearch equivalent of ( "human" or "humanity" or "humming" or "huge" or
> > ..1000 words here...) before passing the expression to tsearch?
> 
> GiST index of tsearch doen't support prefix search, so it will works only by 
> seqscan, as we know :) disk is much more slow than processor, speed will be 
> limited by disk.

I meant that the expansion of 'hu%' is done before and outside of
tsearch, so the question is how efficient will tsearch be for searching
for hudreds or thousands of words in one expression.


> > How hard (or sensible ;) would be creating such an index using GiST ?
> > As proved by tsearch GiST can cope well with many-to-many indexes.
> 
> Sorry, I don't understand. Do you mean that GiST supports one heap tuple in 
> several index tuple? If yes then no :). GiST doesn't support this feature. I 
> don't think that GiST may help in this situation.

but tsearch seems to support this, and tsearch uses GiST. Is this
functionality added entirely by tsearch ?

--------------
Hannu



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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: Searching for substring with tsearch(1/2)
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Searching for substring with tsearch(1/2)