2
.\" Title: CREATE TEXT SEARCH PARSER
3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "CREATE TEXT SEARCH PARSER" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
CREATE_TEXT_SEARCH_PARSER \- define a new text search parser
23
.\" CREATE TEXT SEARCH PARSER
27
CREATE TEXT SEARCH PARSER \fIname\fR (
28
START = \fIstart_function\fR ,
29
GETTOKEN = \fIgettoken_function\fR ,
30
END = \fIend_function\fR ,
31
LEXTYPES = \fIlextypes_function\fR
32
[, HEADLINE = \fIheadline_function\fR ]
37
CREATE TEXT SEARCH PARSER
38
creates a new text search parser\&. A text search parser defines a method for splitting a text string into tokens and assigning types (categories) to the tokens\&. A parser is not particularly useful by itself, but must be bound into a text search configuration along with some text search dictionaries to be used for searching\&.
40
If a schema name is given then the text search parser is created in the specified schema\&. Otherwise it is created in the current schema\&.
42
You must be a superuser to use
43
CREATE TEXT SEARCH PARSER\&. (This restriction is made because an erroneous text search parser definition could confuse or even crash the server\&.)
46
Chapter 12, Full Text Search, in the documentation
47
for further information\&.
52
The name of the text search parser to be created\&. The name can be schema\-qualified\&.
57
The name of the start function for the parser\&.
60
\fIgettoken_function\fR
62
The name of the get\-next\-token function for the parser\&.
67
The name of the end function for the parser\&.
70
\fIlextypes_function\fR
72
The name of the lextypes function for the parser (a function that returns information about the set of token types it produces)\&.
75
\fIheadline_function\fR
77
The name of the headline function for the parser (a function that summarizes a set of tokens)\&.
80
The function names can be schema\-qualified if necessary\&. Argument types are not given, since the argument list for each type of function is predetermined\&. All except the headline function are required\&.
82
The arguments can appear in any order, not only the one shown above\&.
86
CREATE TEXT SEARCH PARSER
87
statement in the SQL standard\&.
89
ALTER TEXT SEARCH PARSER (\fBALTER_TEXT_SEARCH_PARSER\fR(7)), DROP TEXT SEARCH PARSER (\fBDROP_TEXT_SEARCH_PARSER\fR(7))