Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
d702313f
Commit
d702313f
authored
Aug 06, 2003
by
Teodor Sigaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation about ts_debug
parent
dd2870f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
28 deletions
+27
-28
contrib/tsearch2/docs/tsearch2-ref.html
contrib/tsearch2/docs/tsearch2-ref.html
+27
-28
No files found.
contrib/tsearch2/docs/tsearch2-ref.html
View file @
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment