Thread: Are there only 4 weights in PostgreSQL fulltext search?

Are there only 4 weights in PostgreSQL fulltext search?

From
Gaini Rajeshwar
Date:
Hi,
From the readings and documentation, i understood that there are 4 weights A,B,C,D (1.0, 0.4, 0.2, 0.1 are the defalut values, which can be changed) to rank the search results.
But using just these 4 weights is too less to rank the search results, as i have many fields to use for ranking.
i am just wondering if we can use these existing 4 weights to specify new weight? 
Can we specify/use weights more than just these 4 weights? If it is posiible, how can we do it?

Re: Are there only 4 weights in PostgreSQL fulltext search?

From
Christophe Pettus
Date:
On Oct 12, 2009, at 9:59 PM, Gaini Rajeshwar wrote:
> From the readings and documentation, i understood that there are 4
> weights A,B,C,D (1.0, 0.4, 0.2, 0.1 are the defalut values, which
> can be changed) to rank the search results.
> But using just these 4 weights is too less to rank the search
> results, as i have many fields to use for ranking.

You are correct that there are only four weights.  Each weight,
however, can be assigned to any number of fields; you are not limited
to just four fields (if I understand your comment correctly).

--
-- Christophe Pettus
    xof@thebuild.com


Re: Are there only 4 weights in PostgreSQL fulltext search?

From
Gaini Rajeshwar
Date:


On Tue, Oct 13, 2009 at 11:00 AM, Christophe Pettus <xof@thebuild.com> wrote:

On Oct 12, 2009, at 9:59 PM, Gaini Rajeshwar wrote:
From the readings and documentation, i understood that there are 4 weights A,B,C,D (1.0, 0.4, 0.2, 0.1 are the defalut values, which can be changed) to rank the search results.
But using just these 4 weights is too less to rank the search results, as i have many fields to use for ranking.

You are correct that there are only four weights.  Each weight, however, can be assigned to any number of fields; you are not limited to just four fields (if I understand your comment correctly).
Yes that is true. we can assign each weight to any number of fields. But, my requirement is something like this.
I have more than 4 fields, say title, abstract, summary, body, background. I want to give weights to these 5 fields such a way that
weight(summary) > weight(abstract) > weight(title) > weight(body) > weight(background)
is this possible to achieve with these 4 weights?

--
-- Christophe Pettus
  xof@thebuild.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general