mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
First rough cut at text search documentation: bare bones reference
pages for the new SQL commands. I also committed Bruce's text search introductory chapter, as-is except for fixing some markup errors, so that there would be a place for the reference pages to link to.
This commit is contained in:
126
doc/src/sgml/ref/create_tsconfig.sgml
Normal file
126
doc/src/sgml/ref/create_tsconfig.sgml
Normal file
@@ -0,0 +1,126 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tsconfig.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
<refentry id="SQL-CREATETSCONFIG">
|
||||
<refmeta>
|
||||
<refentrytitle id="sql-createtsconfig-title">CREATE TEXT SEARCH CONFIGURATION</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>CREATE TEXT SEARCH CONFIGURATION</refname>
|
||||
<refpurpose>define a new text search configuration</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<indexterm zone="sql-createtsconfig">
|
||||
<primary>CREATE TEXT SEARCH CONFIGURATION</primary>
|
||||
</indexterm>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
CREATE TEXT SEARCH CONFIGURATION <replaceable class="parameter">name</replaceable> (
|
||||
PARSER = <replaceable class="parameter">parser_name</replaceable> |
|
||||
COPY = <replaceable class="parameter">source_config</replaceable>
|
||||
)
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<para>
|
||||
<command>CREATE TEXT SEARCH CONFIGURATION</command> creates a new text
|
||||
search configuration. A text search configuration specifies a text
|
||||
search parser that can divide a string into tokens, plus dictionaries
|
||||
that can be used to determine which tokens are of interest for searching.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If only the parser is specified, then the new text search configuration
|
||||
initially has no mappings from token types to dictionaries, and therefore
|
||||
will ignore all words. Subsequent <command>ALTER TEXT SEARCH
|
||||
CONFIGURATION</command> commands must be used to create mappings to
|
||||
make the configuration useful. Alternatively, an existing text search
|
||||
configuration can be copied.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If a schema name is given then the text search configuration is created in
|
||||
the specified schema. Otherwise it is created in the current schema.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The user who defines a text search configuration becomes its owner.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Refer to <xref linkend="textsearch"> for further information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Parameters</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><replaceable class="parameter">name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the text search configuration to be created. The name can be
|
||||
schema-qualified.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="parameter">parser_name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the text search parser to use for this configuration.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="parameter">source_config</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of an existing text search configuration to copy.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Notes</title>
|
||||
|
||||
<para>
|
||||
It is allowed to specify both <literal>PARSER</> and <literal>COPY</>,
|
||||
resulting in the specified parser being used with whatever mappings
|
||||
are in the source configuration. This is generally inadvisable,
|
||||
unless you know that both parsers involved use the same token type set.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Compatibility</title>
|
||||
|
||||
<para>
|
||||
There is no <command>CREATE TEXT SEARCH CONFIGURATION</command> statement
|
||||
in the SQL standard.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>See Also</title>
|
||||
|
||||
<simplelist type="inline">
|
||||
<member><xref linkend="sql-altertsconfig" endterm="sql-altertsconfig-title"></member>
|
||||
<member><xref linkend="sql-droptsconfig" endterm="sql-droptsconfig-title"></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
Reference in New Issue
Block a user