2 .\" Title: CREATE TEXT SEARCH PARSER
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "CREATE TEXT SEARCH PARSER" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 CREATE_TEXT_SEARCH_PARSER \- define a new text search parser
35 CREATE TEXT SEARCH PARSER \fIname\fR (
36 START = \fIstart_function\fR ,
37 GETTOKEN = \fIgettoken_function\fR ,
38 END = \fIend_function\fR ,
39 LEXTYPES = \fIlextypes_function\fR
40 [, HEADLINE = \fIheadline_function\fR ]
45 \fBCREATE TEXT SEARCH PARSER\fR
46 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\&.
48 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\&.
50 You must be a superuser to use
51 \fBCREATE TEXT SEARCH PARSER\fR\&. (This restriction is made because an erroneous text search parser definition could confuse or even crash the server\&.)
55 for further information\&.
60 The name of the text search parser to be created\&. The name can be schema\-qualified\&.
65 The name of the start function for the parser\&.
68 \fIgettoken_function\fR
70 The name of the get\-next\-token function for the parser\&.
75 The name of the end function for the parser\&.
78 \fIlextypes_function\fR
80 The name of the lextypes function for the parser (a function that returns information about the set of token types it produces)\&.
83 \fIheadline_function\fR
85 The name of the headline function for the parser (a function that summarizes a set of tokens)\&.
88 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\&.
90 The arguments can appear in any order, not only the one shown above\&.
94 \fBCREATE TEXT SEARCH PARSER\fR
95 statement in the SQL standard\&.
97 ALTER TEXT SEARCH PARSER (\fBALTER_TEXT_SEARCH_PARSER\fR(7)), DROP TEXT SEARCH PARSER (\fBDROP_TEXT_SEARCH_PARSER\fR(7))