Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd

From: Alexander Hill <alex(at)hill(dot)net(dot)au>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd
Date: 2014-02-12 01:49:32
Message-ID: CA+KBOKyWkK-EBoiJ96iPDu-ZA=TTENVOC3u-3gFHvQ0uBzWuVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Bruce,

In normal use this won't affect any data that ends up in an index.

The only exception would be where somebody has created an index over the
result of ts_rank_cd - indexing search rank for the most common search
terms, maybe?

But that's true of any function whose result is indexed. What's the upgrade
policy in that case?

Cheers,
Alex

On Tue, Feb 11, 2014 at 11:45 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Fri, Feb 7, 2014 at 02:07:59AM +0800, Alexander Hill wrote:
> > Hi Bruce, all,
> >
> > I think this can be solved (if it's agreed that it's a bug) in a pretty
> > straightforward way: when creating the document representation used in
> > calculating cover density rank, we can just skip lexemes with no position
> > entirely.
> >
> > Fix and tests here:
> https://github.com/AlexHill/postgres/compare/bug_8354
> >
> > As a patch file here: https://github.com/AlexHill/postgres/commit/
> > cd522b254d166d569b86803115f0f499864e949b.patch
>
> OK, great. I am attaching this patch. Would this change the contents
> of any indexes? That would be a problem for pg_upgrade.
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + Everyone has their own god. +
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sandeep Thakkar 2014-02-12 05:20:43 Re: BUG #9142: Bug installing "Database Cluster Initialisation Failed"
Previous Message Roger Berkelmans 2014-02-11 23:16:21 Re: BUG #9182: Data type (text) issue with MS SQL 2012