1CREATE TEXT SEARCH PARSERP(o7s)tgreSQL 9.2.24 DocumentaCtRiEoAnTE TEXT SEARCH PARSER(7)
2
3
4
6 CREATE_TEXT_SEARCH_PARSER - define a new text search parser
7
9 CREATE TEXT SEARCH PARSER name (
10 START = start_function ,
11 GETTOKEN = gettoken_function ,
12 END = end_function ,
13 LEXTYPES = lextypes_function
14 [, HEADLINE = headline_function ]
15 )
16
18 CREATE TEXT SEARCH PARSER creates a new text search parser. A text
19 search parser defines a method for splitting a text string into tokens
20 and assigning types (categories) to the tokens. A parser is not
21 particularly useful by itself, but must be bound into a text search
22 configuration along with some text search dictionaries to be used for
23 searching.
24
25 If a schema name is given then the text search parser is created in the
26 specified schema. Otherwise it is created in the current schema.
27
28 You must be a superuser to use CREATE TEXT SEARCH PARSER. (This
29 restriction is made because an erroneous text search parser definition
30 could confuse or even crash the server.)
31
32 Refer to Chapter 12, Full Text Search, in the documentation for further
33 information.
34
36 name
37 The name of the text search parser to be created. The name can be
38 schema-qualified.
39
40 start_function
41 The name of the start function for the parser.
42
43 gettoken_function
44 The name of the get-next-token function for the parser.
45
46 end_function
47 The name of the end function for the parser.
48
49 lextypes_function
50 The name of the lextypes function for the parser (a function that
51 returns information about the set of token types it produces).
52
53 headline_function
54 The name of the headline function for the parser (a function that
55 summarizes a set of tokens).
56
57 The function names can be schema-qualified if necessary. Argument types
58 are not given, since the argument list for each type of function is
59 predetermined. All except the headline function are required.
60
61 The arguments can appear in any order, not only the one shown above.
62
64 There is no CREATE TEXT SEARCH PARSER statement in the SQL standard.
65
67 ALTER TEXT SEARCH PARSER (ALTER_TEXT_SEARCH_PARSER(7)), DROP TEXT
68 SEARCH PARSER (DROP_TEXT_SEARCH_PARSER(7))
69
70
71
72PostgreSQL 9.2.24 2017-11-06 CREATE TEXT SEARCH PARSER(7)