Re: text search patch status update?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: text search patch status update?
Дата
Msg-id 200901081434.n08EYgf09060@momjian.us
обсуждение исходный текст
Ответ на Re: text search patch status update?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
OK, Heikki still believe the behavior below is a bug.  Can I get
feedback from anyone else on this?  TODO item?

---------------------------------------------------------------------------

> Heikki Linnakangas wrote:
> > Sushant Sinha wrote:
> > > Patch #2. I think this is a straigt forward bug fix.
> > 
> > Yes, I think you're right. In hlCover(), *q is 0 when the only match is 
> > the first item in the text, and we shouldn't bail out with "return 
> > false" in that case.
> > 
> > But there seems to be something else going on here as well:
> > 
> > postgres=# select ts_headline('1 2 3 4 5', '2'::tsquery, 'MinWords=2, 
> > MaxWords=3');
> >   ts_headline
> > --------------
> >   <b>2</b> 3 4
> > (1 row)
> > 
> > postgres=# select ts_headline('aaa1 aaa2 aaa3 aaa4 
> > aaa5','aaa2'::tsquery, 'MinWords=2, MaxWords=3');
> >     ts_headline
> > ------------------
> >   <b>aaa2</b> aaa3
> > (1 row)
> > 
> > In the first example, you get three words, and in the 2nd, just two. It 
> > must be because of the default ShortWord setting of 3. Also, if only the 
> > last word matches, and it's a "short word", you get the whole text:
> > 
> > postgres=# select ts_headline('1 2 3 4 5','5'::tsquery, 'MinWords=2, 
> > MaxWords=3');
> >     ts_headline
> > ------------------
> >   1 2 3 4 <b>5</b>
> > (1 row)
> > 
> > -- 
> >    Heikki Linnakangas
> >    EnterpriseDB   http://www.enterprisedb.com
> > 
> > -- 
> > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-hackers
> 
> -- 
>   Bruce Momjian  <bruce@momjian.us>        http://momjian.us
>   EnterpriseDB                             http://enterprisedb.com
> 
>   + If your life is a hard drive, Christ can be your backup. +
> 
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: ONLY with parentheses
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ONLY with parentheses