Re: text search: restricting the number of parsed words in headline generation

From: Sushant Sinha <sushant354(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: text search: restricting the number of parsed words in headline generation
Date: 2011-08-24 04:38:11
Message-ID: CAJqjnSfeeG7UCAGDMSKT1P-gg02DUHk9=ketpnmxDmM7iTsycw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Actually, this code seems probably flat-out wrong: won't every
> successful call of hlCover() on a given document return exactly the same
> q value (end position), namely the last token occurrence in the
> document? How is that helpful?
>
> regards, tom lane
>

There is a line that saves the computation state from the previous call and
search only starts from there:

int pos = *p;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-24 04:49:22 Re: Another extensions bug
Previous Message Tom Lane 2011-08-24 02:31:42 Re: text search: restricting the number of parsed words in headline generation