Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
d702313f
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d702313f
编写于
8月 06, 2003
作者:
T
Teodor Sigaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add documentation about ts_debug
上级
dd2870f7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
28 deletion
+27
-28
contrib/tsearch2/docs/tsearch2-ref.html
contrib/tsearch2/docs/tsearch2-ref.html
+27
-28
未找到文件。
contrib/tsearch2/docs/tsearch2-ref.html
浏览文件 @
d702313f
...
...
@@ -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.
<h2><a
name=
"dictionaries"
>
Parsers
</a></h2>
<h2><a
name=
"testing"
>
Testing
</a></h2>
Function
<tt>
ts_debug
</tt>
allows easy testing of your
<b>
current
</b>
configuration.
You may always test another configuration using
<tt>
set_curcfg
</tt>
function.
<p>
Example:
</p><pre>
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'
</pre>
Here:
<br>
<ul>
<li>
tsname - configuration name
</li><li>
tok_type - token type
</li><li>
description - human readable name of tok_type
</li><li>
token - parser's token
</li><li>
dict_name - dictionary used for the token
</li><li>
tsvector - final result
</li></ul>
<h2><a
name=
"parsers"
>
Parsers
</a></h2>
Each parser is defined by a record in the
<tt>
pg_ts_parser
</tt>
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
<tt>
alias
</tt>
which names the token type,
and a short description
<tt>
descr
</tt>
for the user to read.
<br>
Example:
<br>
<pre>
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'
</pre>
Here:
<ul>
<li>
tsname - configuration name
</li><li>
tok_type - token type
</li><li>
description - human readable name of tok_type
</li><li>
token - parser's token
</li><li>
dict_name - dictionary will be used for the token
</li><li>
tsvector - final result
</li></ul>
</dd><dt>
<tt>
CREATE FUNCTION parse(
<em>
[
</em>
<i>
parser
</i>
,
<em>
]
</em>
<i>
document
</i>
TEXT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录