[moved to -hackers, because talk is about implementation details]
I've ported the patch of Sushant Sinha for fragmented headlines to pg8.3.1
(http://archives.postgresql.org/pgsql-general/2007-11/msg00508.php)
Thank you.
1 > diff -Nrub postgresql-8.3.1-orig/contrib/tsearch2/tsearch2.c
now contr
On Fri, May 23, 2008 at 7:10 AM, Sushant Sinha <[EMAIL PROTECTED]> wrote:
> Teodor did not want a separate function. He wanted it as an extension to
> ts_headline. One way to do this will be to invoke it only when options
> like MaxCoverSize is used. It will be slightly ugly though.
What I underst
Thanks Pierre for porting this! I just tested this for my application
and it works. There was a small bug in that startHL has to be
initialized to 0 for each chosen cover. I fixed that and attached the
new patch.
Teodor did not want a separate function. He wanted it as an extension to
ts_headline.
Hi,
I've ported the patch of Sushant Sinha for fragmented headlines to pg8.3.1
(http://archives.postgresql.org/pgsql-general/2007-11/msg00508.php)
W.r.t, http://archives.postgresql.org/pgsql-general/2008-03/msg00806.php
I can continue the work until this becomes an acceptable patch for pg.
Pierr
Where are we on this?
---
Teodor Sigaev wrote:
> > The patch takes into account the corner case of overlap. Here is the
> > code for that
> > // start check
> > if (!startHL && *currentpos >= startpos)
> >startHL = 1
The patch takes into account the corner case of overlap. Here is the
code for that
// start check
if (!startHL && *currentpos >= startpos)
startHL = 1;
The headline generation will not start until currentpos has gone past
startpos.
Ok
You can also check how this headline function is w
Ah I missed this email. I agree with Teodor that this is not the best
way to implement this functionality. At the time I was in a bit of hurry
to have something better than the default one and just hacked this. And
if we want to have this functionality across languages and parsers it
will be better
Teodor, Oleg, do we want this?
http://archives.postgresql.org/pgsql-general/2007-11/msg00508.php
I suppose, we want it. But there are a questions/issues:
- Is it needed to introduce new function? may be it will be better to add option
to existing headline function. I'd like to keep cu
Teodor, Oleg, do we want this?
http://archives.postgresql.org/pgsql-general/2007-11/msg00508.php
---
Sushant Sinha wrote:
> I wrote a headline generation function for my app and I have attached
> the patch (against
This has been saved for the 8.4 release:
http://momjian.postgresql.org/cgi-bin/pgpatches_hold
---
Sushant Sinha wrote:
> I wrote a headline generation function for my app and I have attached
> the patch (against the
I wrote a headline generation function for my app and I have attached
the patch (against the cvs head). It generates multiple contexts in
which the query appears. Essentially, it uses the cover function to
generate all covers, chooses smallest covers and stretches each
selected cover according to t
On 30/10/2007, Oleg Bartunov <[EMAIL PROTECTED]> wrote:
> ok, then you have to formalize many things - how long should be excerpts,
> how much excerpts to show, etc. In tsearch2 we have get_covers() function,
> which produces all excerpts like:
>
> =# select get_covers(to_tsvector('1 2 3 4 5 3 4 ab
On Tue, 30 Oct 2007, Tom Lane wrote:
On 10/30/07, Oleg Bartunov <[EMAIL PROTECTED]> wrote:
... In tsearch2 we have get_covers() function,
which produces all excerpts like:
I had not realized till just now that the 8.3 core version of tsearch
omitted any material feature of contrib/tsearch2.
> On 10/30/07, Oleg Bartunov <[EMAIL PROTECTED]> wrote:
>> ... In tsearch2 we have get_covers() function,
>> which produces all excerpts like:
I had not realized till just now that the 8.3 core version of tsearch
omitted any material feature of contrib/tsearch2. Why was get_covers()
left out?
This is a nice idea and seems easy to implement. I will try to write
it down and send a patch to the mailing list.
I was also working to add support for phrase search. Currently to
check for phrase you have to match the entire document. It will be
better if a filter like are_words_consecutive(tsve
On Tue, 30 Oct 2007, Catalin Marinas wrote:
On 30/10/2007, Richard Huxton <[EMAIL PROTECTED]> wrote:
Oleg Bartunov wrote:
Catalin,
what is your need ? What's wrong with this ?
postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3
xyz','2'::tsquery, 'StartSel=...,StopSel=...')
;
On 30/10/2007, Richard Huxton <[EMAIL PROTECTED]> wrote:
> Oleg Bartunov wrote:
> > Catalin,
> >
> > what is your need ? What's wrong with this ?
> >
> > postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3
> > xyz','2'::tsquery, 'StartSel=...,StopSel=...')
> > ;
> > ts_headline
Oleg Bartunov wrote:
Catalin,
what is your need ? What's wrong with this ?
postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3
xyz','2'::tsquery, 'StartSel=...,StopSel=...')
;
ts_headline
---
1 ...2... 3 4 5 3 4 abc abc ...2... 3 x
Catalin,
what is your need ? What's wrong with this ?
postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3 xyz','2'::tsquery,
'StartSel=...,StopSel=...')
;
ts_headline
---
1 ...2... 3 4 5 3 4 abc abc ...2... 3 xyz
Oleg
On Tue, 30 Oc
On 28/10/2007, Oleg Bartunov <[EMAIL PROTECTED]> wrote:
> On Sat, 27 Oct 2007, Tom Lane wrote:
>
> > "Catalin Marinas" <[EMAIL PROTECTED]> writes:
> >> Is there an easy way to generate a headline from separate fragments
> >> containing the search words and maybe separated by "..."?
> >
> > Hmm, the
On Sat, 27 Oct 2007, Tom Lane wrote:
"Catalin Marinas" <[EMAIL PROTECTED]> writes:
Is there an easy way to generate a headline from separate fragments
containing the search words and maybe separated by "..."?
Hmm, the documentation for ts_headline claims it does this already:
ts_headline
"Catalin Marinas" <[EMAIL PROTECTED]> writes:
> Is there an easy way to generate a headline from separate fragments
> containing the search words and maybe separated by "..."?
Hmm, the documentation for ts_headline claims it does this already:
ts_headline accepts a document along
with a q
Hi,
(I first posted it via google groups and realised that I have to be
subscribed; now posting directly)
I searched the list but couldn't find anyone raising the issue (or it
might simply be my way of using the tool).
I'd like to search through some text documents for words and generate
headli
23 matches
Mail list logo