2007-08-21 23:08:47 +02:00
|
|
|
<!--
|
2008-11-14 11:22:48 +01:00
|
|
|
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tsdictionary.sgml,v 1.3 2008/11/14 10:22:46 petere Exp $
|
2007-08-21 23:08:47 +02:00
|
|
|
PostgreSQL documentation
|
|
|
|
-->
|
|
|
|
|
|
|
|
<refentry id="SQL-CREATETSDICTIONARY">
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle id="sql-createtsdictionary-title">CREATE TEXT SEARCH DICTIONARY</refentrytitle>
|
2008-11-14 11:22:48 +01:00
|
|
|
<manvolnum>7</manvolnum>
|
2007-08-21 23:08:47 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>CREATE TEXT SEARCH DICTIONARY</refname>
|
|
|
|
<refpurpose>define a new text search dictionary</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<indexterm zone="sql-createtsdictionary">
|
|
|
|
<primary>CREATE TEXT SEARCH DICTIONARY</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>
|
|
|
|
CREATE TEXT SEARCH DICTIONARY <replaceable class="parameter">name</replaceable> (
|
|
|
|
TEMPLATE = <replaceable class="parameter">template</replaceable>
|
2007-08-22 03:39:46 +02:00
|
|
|
[, <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ]]
|
2007-08-21 23:08:47 +02:00
|
|
|
)
|
|
|
|
</synopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>CREATE TEXT SEARCH DICTIONARY</command> creates a new text search
|
|
|
|
dictionary. A text search dictionary specifies a way of recognizing
|
|
|
|
interesting or uninteresting words for searching. A dictionary depends
|
|
|
|
on a text search template, which specifies the functions that actually
|
|
|
|
perform the work. Typically the dictionary provides some options that
|
|
|
|
control the detailed behavior of the template's functions.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If a schema name is given then the text search dictionary is created in the
|
|
|
|
specified schema. Otherwise it is created in the current schema.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The user who defines a text search dictionary 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 dictionary to be created. The name can be
|
|
|
|
schema-qualified.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">template</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the text search template that will define the basic
|
|
|
|
behavior of this dictionary.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2007-08-22 03:39:46 +02:00
|
|
|
<term><replaceable class="parameter">option</replaceable></term>
|
2007-08-21 23:08:47 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-08-22 03:39:46 +02:00
|
|
|
The name of a template-specific option to be set for this dictionary.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">value</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The value to use for a template-specific option. If the value
|
|
|
|
is not a simple identifier or number, it must be quoted (but you can
|
|
|
|
always quote it, if you wish).
|
2007-08-21 23:08:47 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2007-08-22 03:39:46 +02:00
|
|
|
|
|
|
|
<para>
|
|
|
|
The options can appear in any order.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The following example command creates a Snowball-based dictionary
|
|
|
|
with a nonstandard list of stop words.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<programlisting>
|
|
|
|
CREATE TEXT SEARCH DICTIONARY my_russian (
|
|
|
|
template = snowball,
|
|
|
|
language = russian,
|
|
|
|
stopwords = myrussian
|
|
|
|
);
|
|
|
|
</programlisting>
|
2007-08-21 23:08:47 +02:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There is no <command>CREATE TEXT SEARCH DICTIONARY</command> statement in
|
|
|
|
the SQL standard.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
|
|
|
<member><xref linkend="sql-altertsdictionary" endterm="sql-altertsdictionary-title"></member>
|
|
|
|
<member><xref linkend="sql-droptsdictionary" endterm="sql-droptsdictionary-title"></member>
|
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|