From: Teodor Sigaev Date: Wed, 6 Aug 2003 09:41:13 +0000 (+0000) Subject: Add documentation about ts_debug X-Git-Tag: REL7_4_BETA2~171 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d702313f0d7b811484d05e495a2353b211475b5e;p=postgresql Add documentation about ts_debug --- diff --git a/contrib/tsearch2/docs/tsearch2-ref.html b/contrib/tsearch2/docs/tsearch2-ref.html index acb673bcab..a6d3107875 100644 --- a/contrib/tsearch2/docs/tsearch2-ref.html +++ b/contrib/tsearch2/docs/tsearch2-ref.html @@ -216,7 +216,33 @@ These dictionaries are tried in order, stopping either with the first one to return a lexeme for the token, or discarding the token if no dictionary returns a lexeme for it. -

Parsers

+

Testing

+ +Function ts_debug allows easy testing of your current configuration. +You may always test another configuration using set_curcfg function. +

+Example: +

apod=# select * from ts_debug('Tsearch module for PostgreSQL 7.3.3');
+ ts_name | tok_type | description |   token    | dict_name |  tsvector    
+---------+----------+-------------+------------+-----------+--------------
+ default | lword    | Latin word  | Tsearch    | {en_stem} | 'tsearch'
+ default | lword    | Latin word  | module     | {en_stem} | 'modul'
+ default | lword    | Latin word  | for        | {en_stem} | 
+ default | lword    | Latin word  | PostgreSQL | {en_stem} | 'postgresql'
+ default | version  | VERSION     | 7.3.3      | {simple}  | '7.3.3'
+
+Here: +
+ + + +

Parsers

Each parser is defined by a record in the pg_ts_parser table: @@ -261,33 +287,6 @@ the current parser is used when this argument is omitted. which the parser will label each token of that type, the alias which names the token type, and a short description descr for the user to read. -
- Example: -
-
 apod=# select m.ts_name, t.alias as tok_type, t.descr as description, p.token,\
- apod=# m.dict_name, strip(to_tsvector(p.token)) as tsvector\
- apod=# from parse('Tsearch module for PostgreSQL 7.3.3') as\
- apod=# p, token_type() as t, pg_ts_cfgmap as m, pg_ts_cfg as c\
- apod=# where t.tokid=p.tokid and t.alias = m.tok_alias\
- apod=# and m.ts_name=c.ts_name and c.oid=show_curcfg();
-  ts_name | tok_type | description |   token    | dict_name |  tsvector    
- ---------+----------+-------------+------------+-----------+--------------
-  default | lword    | Latin word  | Tsearch    | {en_stem} | 'tsearch'
-  default | word     | Word        | module     | {simple}  | 'modul'
-  default | lword    | Latin word  | for        | {en_stem} | 
-  default | lword    | Latin word  | PostgreSQL | {en_stem} | 'postgresql'
-  default | version  | VERSION     | 7.3.3      | {simple}  | '7.3.3'
- 
- Here: - -
CREATE FUNCTION parse( [ parser, ] document TEXT