Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E75A52E0048 for ; Sun, 2 Dec 2007 13:34:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 27028-10 for ; Sun, 2 Dec 2007 13:34:10 -0400 (AST) Received: from k2smtpout05-01.prod.mesa1.secureserver.net (k2smtpout05-01.prod.mesa1.secureserver.net [64.202.189.56]) by postgresql.org (Postfix) with SMTP id 075602E003E for ; Sun, 2 Dec 2007 13:34:10 -0400 (AST) Received: (qmail 9753 invoked from network); 2 Dec 2007 17:34:09 -0000 Received: from unknown (HELO mail.cowdot.com) (208.109.83.21) by k2smtpout05-01.prod.mesa1.secureserver.net (64.202.189.56) with ESMTP; 02 Dec 2007 17:34:09 -0000 Received: by mail.cowdot.com (Postfix, from userid 99) id 3C33957AD88; Sun, 2 Dec 2007 10:33:59 -0700 (MST) Received: from [192.168.0.2] (111.pool85-52-225.static.orange.es [85.52.225.111]) by mail.cowdot.com (Postfix) with ESMTP id 0EA6657AD86; Sun, 2 Dec 2007 10:33:55 -0700 (MST) From: Albert Cervera i Areny Organization: NaN To: Bruce Momjian Subject: Re: About contrib modules Date: Sun, 2 Dec 2007 18:34:17 +0100 User-Agent: KMail/1.9.7 Cc: pgsql-docs@postgresql.org References: <200711221623.lAMGNEX03651@momjian.us> In-Reply-To: <200711221623.lAMGNEX03651@momjian.us> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_ayuUHTD5bQV23i3" Message-Id: <200712021834.18556.albert@nan-tic.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/2 X-Sequence-Number: 4670 --Boundary-00=_ayuUHTD5bQV23i3 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline A Dijous 22 Novembre 2007, Bruce Momjian va escriure: > albert@nan-tic.com wrote: > > I'm sorry I haven't said anything yet. I've got no Internet connection at > > home. I'll work on the remaining work on contrib docs as soon as my > > Internet connection is restablished. > > Thanks. We probably have 1-2 weeks left to get it into 8.3 final. Attached, the dict_int and dict_xsyn SGML docs. Now I'll work on the lost changes of the already SGML'ed docs. -- Albert Cervera i Areny http://www.NaN-tic.com --Boundary-00=_ayuUHTD5bQV23i3 Content-Type: text/x-diff; charset="iso-8859-15"; name="dicts.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dicts.diff" Index: contrib.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/contrib.sgml,v retrieving revision 1.4 diff -c -r1.4 contrib.sgml *** contrib.sgml 14 Nov 2007 02:36:43 -0000 1.4 --- contrib.sgml 2 Dec 2007 17:32:09 -0000 *************** *** 82,87 **** --- 82,89 ---- &chkpass; &cube; &dblink; + &dict-int; + &dict-xsyn; &earthdistance; &fuzzystrmatch; &hstore; Index: filelist.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/filelist.sgml,v retrieving revision 1.53 diff -c -r1.53 filelist.sgml *** filelist.sgml 14 Nov 2007 01:09:50 -0000 1.53 --- filelist.sgml 2 Dec 2007 17:32:10 -0000 *************** *** 96,101 **** --- 96,103 ---- + + --Boundary-00=_ayuUHTD5bQV23i3 Content-Type: text/sgml; charset="iso-8859-15"; name="dict-int.sgml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dict-int.sgml" dict_int The motivation for this example dictionary is to control the indexing of integers (signed and unsigned), and, consequently, to minimize the number of unique words which greatly affect the performance of searching. Configuration The dictionary accepts two options: The MAXLEN parameter specifies the maximum length (number of digits) allowed in an integer word. The default value is 6. The REJECTLONG parameter specifies if an overlength integer should be truncated or ignored. If REJECTLONG=FALSE (default), the dictionary returns the first MAXLEN digits of the integer. If REJECTLONG=TRUE, the dictionary treats an overlength integer as a stop word, so that it will not be indexed. Usage mydb# select ts_lexize('intdict', '12345678'); ts_lexize ----------- {123456} Change dictionary options: mydb# ALTER TEXT SEARCH DICTIONARY intdict (MAXLEN = 4, REJECTLONG = true); ALTER TEXT SEARCH DICTIONARY --Boundary-00=_ayuUHTD5bQV23i3 Content-Type: text/sgml; charset="iso-8859-15"; name="dict-xsyn.sgml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dict-xsyn.sgml" dict_xsyn The Extended Synonym Dictionary module replaces words with groups of their synonyms, and so makes it possible to search for a word using any of its synonyms. Configuration It accepts the following options: KEEPORIG controls whether the original word is included, or only its synonyms. Default is 'true'. RULES is the base name of the file containing the list of synonyms. This file must be in $(prefix)/share/tsearch_data/, and its name must end in ".rules" (which is not included in the RULES parameter). The rules file has the following format: Each line represents a group of synonyms for a single word, which is given first on the line. Synonyms are separated by whitespace: word syn1 syn2 syn3 Sharp ('#') sign is a comment delimiter. It may appear at any position inside the line. The rest of the line will be skipped. Look at xsyn_sample.rules, which is installed in $(prefix)/share/tsearch_data/, for an example. Usage mydb=# SELECT ts_lexize('xsyn','word'); ts_lexize ---------------- {word,syn1,syn2,syn3) Change dictionary options: mydb# ALTER TEXT SEARCH DICTIONARY xsyn (KEEPORIG=false); ALTER TEXT SEARCH DICTIONARY --Boundary-00=_ayuUHTD5bQV23i3--