Re: gsoc, oprrest function for text search

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: gsoc, oprrest function for text search
Дата
Msg-id 488EC585.8020502@enterprisedb.com
обсуждение исходный текст
Ответ на gsoc, oprrest function for text search  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Ответы Re: gsoc, oprrest function for text search  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Список pgsql-hackers
Jan Urbański wrote:
> Here's a WIP patch implementing an oprrest function for tsvector @@ 
> tsquery and tsquery @@ tsvector.
> 
> The idea is (quoting a comment)
> /*
>  *  Traverse the tsquery preorder, calculating selectivity as:
>  *
>  *   selec(left_oper) * selec(right_oper) in AND nodes,
>  *
>  *   selec(left_oper) + selec(right_oper) -
>  *      selec(left_oper) * selec(right_oper) in OR nodes,
>  *
>  *   1 - select(oper) in NOT nodes
>  *
>  *   freq[val] in VAL nodes, if the value is in MCELEM
>  *   min(freq[MCELEM]) / 2 in VAL nodes, if it is not

Seems reasonable.

>  *
>  * Implementation-wise, we sort the MCELEM array to use binary
>  * search on it.
>  */

Would it be possible to store the array in sorted order, to avoid 
sorting it on every invocation of tssel?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: WITH RECUSIVE patches 0723
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: gsoc, oprrest function for text search