Re: improvements for dict_xsyn extended synonym dictionary - RRR

From: karpov(at)sao(dot)ru (Sergey V(dot) Karpov)
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: improvements for dict_xsyn extended synonym dictionary - RRR
Date: 2009-07-27 10:01:46
Message-ID: 87skgifnqt.fsf@sao.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:

Hi Andres,

Thank you for review of my patch.

> Some points:
> - Patch looks generally sound
> - lacks a bit of a motivational statement, even though one can imagine uses

The patch has initially been motivated by the request in pgsql-general
(http://archives.postgresql.org/pgsql-general/2009-02/msg00102.php).

> - Imho mode=MAP should error out if keeporig is false
> - I personally find the the names for the different modes a bit nondescriptive.
> One possibility would be to introduce parameters like:
> - matchorig
> - matchsynonym
> - keeporig
> - keepsynonym
> That sounds way much easier to grasp for me.

Yes, I agree. In such a way user has the complete (and more straightforward)
control over the dictionary behaviour.

Here is the revised patch version, with following options:

* matchorig controls whether the original word is accepted by the
dictionary. Default is true.

* keeporig controls whether the original word is included (if true)
in results, or only its synonyms (if false). Default is true.

* matchsynonyms controls whether any of the synonyms is accepted by
the dictionary (if true). Default is false.

* keepsynonyms controls whether synonyms are returned by the
dictionary (if true). Default is true.

Defaults are set to keep default behaviour compatible with original version.

Thanks,
Sergey

Attachment Content-Type Size
dict_xsyn.diff text/x-patch 12.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-07-27 10:30:43 Re: autogenerating headers & bki stuff
Previous Message Magnus Hagander 2009-07-27 09:01:44 Re: [COMMITTERS] pgsql: Reserve the shared memory region during backend startup on