]> begriffs open source - ai-pg/blob - full-docs/man7/CREATE_TEXT_SEARCH_PARSER.7
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / man7 / CREATE_TEXT_SEARCH_PARSER.7
1 '\" t
2 .\"     Title: CREATE TEXT SEARCH PARSER
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 CREATE_TEXT_SEARCH_PARSER \- define a new text search parser
32 .SH "SYNOPSIS"
33 .sp
34 .nf
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 ]
41 )
42 .fi
43 .SH "DESCRIPTION"
44 .PP
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\&.
47 .PP
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\&.
49 .PP
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\&.)
52 .PP
53 Refer to
54 Chapter\ \&12
55 for further information\&.
56 .SH "PARAMETERS"
57 .PP
58 \fIname\fR
59 .RS 4
60 The name of the text search parser to be created\&. The name can be schema\-qualified\&.
61 .RE
62 .PP
63 \fIstart_function\fR
64 .RS 4
65 The name of the start function for the parser\&.
66 .RE
67 .PP
68 \fIgettoken_function\fR
69 .RS 4
70 The name of the get\-next\-token function for the parser\&.
71 .RE
72 .PP
73 \fIend_function\fR
74 .RS 4
75 The name of the end function for the parser\&.
76 .RE
77 .PP
78 \fIlextypes_function\fR
79 .RS 4
80 The name of the lextypes function for the parser (a function that returns information about the set of token types it produces)\&.
81 .RE
82 .PP
83 \fIheadline_function\fR
84 .RS 4
85 The name of the headline function for the parser (a function that summarizes a set of tokens)\&.
86 .RE
87 .PP
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\&.
89 .PP
90 The arguments can appear in any order, not only the one shown above\&.
91 .SH "COMPATIBILITY"
92 .PP
93 There is no
94 \fBCREATE TEXT SEARCH PARSER\fR
95 statement in the SQL standard\&.
96 .SH "SEE ALSO"
97 ALTER TEXT SEARCH PARSER (\fBALTER_TEXT_SEARCH_PARSER\fR(7)), DROP TEXT SEARCH PARSER (\fBDROP_TEXT_SEARCH_PARSER\fR(7))