~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/create_tsdictionary.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
doc/src/sgml/ref/create_tsdictionary.sgml
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-CREATETSDICTIONARY">
 
7
 <refmeta>
 
8
  <refentrytitle>CREATE TEXT SEARCH DICTIONARY</refentrytitle>
 
9
  <manvolnum>7</manvolnum>
 
10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
11
 </refmeta>
 
12
 
 
13
 <refnamediv>
 
14
  <refname>CREATE TEXT SEARCH DICTIONARY</refname>
 
15
  <refpurpose>define a new text search dictionary</refpurpose>
 
16
 </refnamediv>
 
17
 
 
18
 <indexterm zone="sql-createtsdictionary">
 
19
  <primary>CREATE TEXT SEARCH DICTIONARY</primary>
 
20
 </indexterm>
 
21
 
 
22
 <refsynopsisdiv>
 
23
<synopsis>
 
24
CREATE TEXT SEARCH DICTIONARY <replaceable class="parameter">name</replaceable> (
 
25
    TEMPLATE = <replaceable class="parameter">template</replaceable>
 
26
    [, <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ]]
 
27
)
 
28
</synopsis>
 
29
 </refsynopsisdiv>
 
30
 
 
31
 <refsect1>
 
32
  <title>Description</title>
 
33
 
 
34
  <para>
 
35
   <command>CREATE TEXT SEARCH DICTIONARY</command> creates a new text search
 
36
   dictionary.  A text search dictionary specifies a way of recognizing
 
37
   interesting or uninteresting words for searching.  A dictionary depends
 
38
   on a text search template, which specifies the functions that actually
 
39
   perform the work.  Typically the dictionary provides some options that
 
40
   control the detailed behavior of the template's functions.
 
41
  </para>
 
42
 
 
43
  <para>
 
44
   If a schema name is given then the text search dictionary is created in the
 
45
   specified schema.  Otherwise it is created in the current schema.
 
46
  </para>
 
47
 
 
48
  <para>
 
49
   The user who defines a text search dictionary becomes its owner.
 
50
  </para>
 
51
 
 
52
  <para>
 
53
   Refer to <xref linkend="textsearch"> for further information.
 
54
  </para>
 
55
 </refsect1>
 
56
 
 
57
 <refsect1>
 
58
  <title>Parameters</title>
 
59
 
 
60
  <variablelist>
 
61
   <varlistentry>
 
62
    <term><replaceable class="parameter">name</replaceable></term>
 
63
    <listitem>
 
64
     <para>
 
65
      The name of the text search dictionary to be created.  The name can be
 
66
      schema-qualified.
 
67
     </para>
 
68
    </listitem>
 
69
   </varlistentry>
 
70
 
 
71
   <varlistentry>
 
72
    <term><replaceable class="parameter">template</replaceable></term>
 
73
    <listitem>
 
74
     <para>
 
75
      The name of the text search template that will define the basic
 
76
      behavior of this dictionary.
 
77
     </para>
 
78
    </listitem>
 
79
   </varlistentry>
 
80
 
 
81
   <varlistentry>
 
82
    <term><replaceable class="parameter">option</replaceable></term>
 
83
    <listitem>
 
84
     <para>
 
85
      The name of a template-specific option to be set for this dictionary.
 
86
     </para>
 
87
    </listitem>
 
88
   </varlistentry>
 
89
 
 
90
   <varlistentry>
 
91
    <term><replaceable class="parameter">value</replaceable></term>
 
92
    <listitem>
 
93
     <para>
 
94
      The value to use for a template-specific option.  If the value
 
95
      is not a simple identifier or number, it must be quoted (but you can
 
96
      always quote it, if you wish).
 
97
     </para>
 
98
    </listitem>
 
99
   </varlistentry>
 
100
  </variablelist>
 
101
 
 
102
  <para>
 
103
   The options can appear in any order.
 
104
  </para>
 
105
 </refsect1>
 
106
 
 
107
 <refsect1>
 
108
  <title>Examples</title>
 
109
 
 
110
  <para>
 
111
   The following example command creates a Snowball-based dictionary
 
112
   with a nonstandard list of stop words.
 
113
  </para>
 
114
 
 
115
<programlisting>
 
116
CREATE TEXT SEARCH DICTIONARY my_russian (
 
117
    template = snowball,
 
118
    language = russian,
 
119
    stopwords = myrussian
 
120
);
 
121
</programlisting>
 
122
 </refsect1>
 
123
 
 
124
 <refsect1>
 
125
  <title>Compatibility</title>
 
126
 
 
127
  <para>
 
128
   There is no <command>CREATE TEXT SEARCH DICTIONARY</command> statement in
 
129
   the SQL standard.
 
130
  </para>
 
131
 </refsect1>
 
132
 
 
133
 <refsect1>
 
134
  <title>See Also</title>
 
135
 
 
136
  <simplelist type="inline">
 
137
   <member><xref linkend="sql-altertsdictionary"></member>
 
138
   <member><xref linkend="sql-droptsdictionary"></member>
 
139
  </simplelist>
 
140
 </refsect1>
 
141
</refentry>