| 1 |
<!-- |
| 2 |
doc/src/sgml/ref/create_tsconfig.sgml |
| 3 |
PostgreSQL documentation |
| 4 |
--> |
| 5 |
|
| 6 |
<refentry id="sql-createtsconfig"> |
| 7 |
<indexterm zone="sql-createtsconfig"> |
| 8 |
<primary>CREATE TEXT SEARCH CONFIGURATION</primary> |
| 9 |
</indexterm> |
| 10 |
|
| 11 |
<refmeta> |
| 12 |
<refentrytitle>CREATE TEXT SEARCH CONFIGURATION</refentrytitle> |
| 13 |
<manvolnum>7</manvolnum> |
| 14 |
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
| 15 |
</refmeta> |
| 16 |
|
| 17 |
<refnamediv> |
| 18 |
<refname>CREATE TEXT SEARCH CONFIGURATION</refname> |
| 19 |
<refpurpose>define a new text search configuration</refpurpose> |
| 20 |
</refnamediv> |
| 21 |
|
| 22 |
<refsynopsisdiv> |
| 23 |
<synopsis> |
| 24 |
CREATE TEXT SEARCH CONFIGURATION <replaceable class="parameter">name</replaceable> ( |
| 25 |
PARSER = <replaceable class="parameter">parser_name</replaceable> | |
| 26 |
COPY = <replaceable class="parameter">source_config</replaceable> |
| 27 |
) |
| 28 |
</synopsis> |
| 29 |
</refsynopsisdiv> |
| 30 |
|
| 31 |
<refsect1> |
| 32 |
<title>Description</title> |
| 33 |
|
| 34 |
<para> |
| 35 |
<command>CREATE TEXT SEARCH CONFIGURATION</command> creates a new text |
| 36 |
search configuration. A text search configuration specifies a text |
| 37 |
search parser that can divide a string into tokens, plus dictionaries |
| 38 |
that can be used to determine which tokens are of interest for searching. |
| 39 |
</para> |
| 40 |
|
| 41 |
<para> |
| 42 |
If only the parser is specified, then the new text search configuration |
| 43 |
initially has no mappings from token types to dictionaries, and therefore |
| 44 |
will ignore all words. Subsequent <command>ALTER TEXT SEARCH |
| 45 |
CONFIGURATION</command> commands must be used to create mappings to |
| 46 |
make the configuration useful. Alternatively, an existing text search |
| 47 |
configuration can be copied. |
| 48 |
</para> |
| 49 |
|
| 50 |
<para> |
| 51 |
If a schema name is given then the text search configuration is created in |
| 52 |
the specified schema. Otherwise it is created in the current schema. |
| 53 |
</para> |
| 54 |
|
| 55 |
<para> |
| 56 |
The user who defines a text search configuration becomes its owner. |
| 57 |
</para> |
| 58 |
|
| 59 |
<para> |
| 60 |
Refer to <xref linkend="textsearch"/> for further information. |
| 61 |
</para> |
| 62 |
</refsect1> |
| 63 |
|
| 64 |
<refsect1> |
| 65 |
<title>Parameters</title> |
| 66 |
|
| 67 |
<variablelist> |
| 68 |
<varlistentry> |
| 69 |
<term><replaceable class="parameter">name</replaceable></term> |
| 70 |
<listitem> |
| 71 |
<para> |
| 72 |
The name of the text search configuration to be created. The name can be |
| 73 |
schema-qualified. |
| 74 |
</para> |
| 75 |
</listitem> |
| 76 |
</varlistentry> |
| 77 |
|
| 78 |
<varlistentry> |
| 79 |
<term><replaceable class="parameter">parser_name</replaceable></term> |
| 80 |
<listitem> |
| 81 |
<para> |
| 82 |
The name of the text search parser to use for this configuration. |
| 83 |
</para> |
| 84 |
</listitem> |
| 85 |
</varlistentry> |
| 86 |
|
| 87 |
<varlistentry> |
| 88 |
<term><replaceable class="parameter">source_config</replaceable></term> |
| 89 |
<listitem> |
| 90 |
<para> |
| 91 |
The name of an existing text search configuration to copy. |
| 92 |
</para> |
| 93 |
</listitem> |
| 94 |
</varlistentry> |
| 95 |
</variablelist> |
| 96 |
</refsect1> |
| 97 |
|
| 98 |
<refsect1> |
| 99 |
<title>Notes</title> |
| 100 |
|
| 101 |
<para> |
| 102 |
The <literal>PARSER</literal> and <literal>COPY</literal> options are mutually |
| 103 |
exclusive, because when an existing configuration is copied, its |
| 104 |
parser selection is copied too. |
| 105 |
</para> |
| 106 |
|
| 107 |
</refsect1> |
| 108 |
|
| 109 |
<refsect1> |
| 110 |
<title>Compatibility</title> |
| 111 |
|
| 112 |
<para> |
| 113 |
There is no <command>CREATE TEXT SEARCH CONFIGURATION</command> statement |
| 114 |
in the SQL standard. |
| 115 |
</para> |
| 116 |
</refsect1> |
| 117 |
|
| 118 |
<refsect1> |
| 119 |
<title>See Also</title> |
| 120 |
|
| 121 |
<simplelist type="inline"> |
| 122 |
<member><xref linkend="sql-altertsconfig"/></member> |
| 123 |
<member><xref linkend="sql-droptsconfig"/></member> |
| 124 |
</simplelist> |
| 125 |
</refsect1> |
| 126 |
</refentry> |