forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
137 lines
22 KiB
HTML
137 lines
22 KiB
HTML
<a name="EN-US_TOPIC_0000001188429080"></a><a name="EN-US_TOPIC_0000001188429080"></a>
|
|
|
|
<h1 class="topictitle1">CREATE TEXT SEARCH CONFIGURATION</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001188429080__sf71fe034aa9d4c549c3cfb434e55d63c"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001188429080__a82941569dbc94ab48da28a3df7516705"><strong id="EN-US_TOPIC_0000001188429080__b1726333638231225">CREATE TEXT SEARCH CONFIGURATION</strong> creates a 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. </p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188429080__sf3df97922dcc4a3094ada4f161dd53d5"><h4 class="sectiontitle">Precautions</h4><ul id="EN-US_TOPIC_0000001188429080__ud633a100baf645aaa6b232d2c1ce93e6"><li id="EN-US_TOPIC_0000001188429080__li131078817237">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 <strong id="EN-US_TOPIC_0000001188429080__b842352706152736">ALTER TEXT SEARCH CONFIGURATION</strong> commands must be used to create mappings to make the configuration useful. If <strong id="EN-US_TOPIC_0000001188429080__b842352706153056">COPY</strong> option is specified, the parser, mapping and configuration option of text search configuration is copied automatically.</li><li id="EN-US_TOPIC_0000001188429080__li117031118122311">If the schema name is specified, the text search configuration is created in the specified schema. Otherwise, the text search configuration is created in the current schema.</li><li id="EN-US_TOPIC_0000001188429080__li1907172717234">The user who defines a text search configuration becomes its owner.</li><li id="EN-US_TOPIC_0000001188429080__l24e8a8c4e11d4d79a42dcf5847758cdb"><strong id="EN-US_TOPIC_0000001188429080__b84235270617954">PARSER</strong> and <strong id="EN-US_TOPIC_0000001188429080__b84235270617102">COPY</strong> options are mutually exclusive, because when an existing configuration is copied, its parser selection is copied too. </li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188429080__s432427bf362e4684b4559ac16cfcda57"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188429080__s18d476418c7748ada6302a1c75028d5d"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="n">name</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">PARSER</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parser_name</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">COPY</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source_config</span><span class="w"> </span><span class="p">)</span>
|
|
<span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="err">{</span><span class="n">configuration_option</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="err">}</span><span class="w"> </span><span class="p">[,</span><span class="w"> </span><span class="p">...]</span><span class="w"> </span><span class="p">)];</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188429080__s871a6652f67948d9a6a4abc2ae11dc01"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001188429080__u87a6dc6d4b4246e0bf14d893dc8622b6"><li id="EN-US_TOPIC_0000001188429080__l4e57ec9266c94bceb8763ecf8a729f8b"><strong id="EN-US_TOPIC_0000001188429080__a46607074a77746dca5d6a4c0f3d2ce7d">name</strong><p id="EN-US_TOPIC_0000001188429080__a9c837a44b9f6452d8c3e949e089343f2">Specifies the name of the text search configuration to be created. Specifies the name can be schema-qualified.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188429080__l3318ced2284145a08b1f29d018a8c52e"><strong id="EN-US_TOPIC_0000001188429080__a8995d3c4a203465fadc1016b700626c5">parser_name</strong><p id="EN-US_TOPIC_0000001188429080__ae9a721362ef54864a48d750cf7c239c9">Specifies the name of the text search parser to use for this configuration. </p>
|
|
</li><li id="EN-US_TOPIC_0000001188429080__ldbf3922a73434c4a96d9ef41b4ddd9de"><strong id="EN-US_TOPIC_0000001188429080__a18b9b107b40045f081a8bc30f4ec8fde">source_config</strong><p id="EN-US_TOPIC_0000001188429080__a1bb44ad3045d451eba92e535257cd585">Specifies the name of an existing text search configuration to copy. </p>
|
|
</li><li id="EN-US_TOPIC_0000001188429080__lb7fb77d05f304306a299d678e91c3fa4"><strong id="EN-US_TOPIC_0000001188429080__ac6c9f3d7fd664b1bbcd60b88ae214d61">configuration_option</strong><p id="EN-US_TOPIC_0000001188429080__a3d72f9db85ae4a35ae903dcfb5f16450">Specifies the configuration parameter of text search configuration is mainly for the parser executed by <strong id="EN-US_TOPIC_0000001188429080__b67559577618">parser_name</strong> or contained by <strong id="EN-US_TOPIC_0000001188429080__b1675614571869">source_config</strong>.</p>
|
|
<div class="p" id="EN-US_TOPIC_0000001188429080__abbf95ce2779244aca7f650a705d99dbc">Value range: The default, ngram, and zhparser parsers are supported. The parser of default type has no corresponding <strong id="EN-US_TOPIC_0000001188429080__en-us_topic_0085031967_b6113102625010">configuration_option</strong>. <a href="#EN-US_TOPIC_0000001188429080__t5cd5026f6ee04580970c9fe0e49fef47">Table 1</a> lists <strong id="EN-US_TOPIC_0000001188429080__en-us_topic_0085031967_b13113122616501">configuration_option</strong> for ngram and zhparser parsers.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001188429080__t5cd5026f6ee04580970c9fe0e49fef47"></a><a name="t5cd5026f6ee04580970c9fe0e49fef47"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188429080__t5cd5026f6ee04580970c9fe0e49fef47" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Configuration parameters for ngram and zhparser parsers</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188429080__r5a656d1395384eccbd704b6d13a8ce04"><th align="left" class="cellrowborder" valign="top" width="10.45%" id="mcps1.3.4.2.4.3.4.2.5.1.1"><p id="EN-US_TOPIC_0000001188429080__a707192fad71241038bd2cd31e9c89b83"><strong id="EN-US_TOPIC_0000001188429080__b842352706102247">Parser</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.47%" id="mcps1.3.4.2.4.3.4.2.5.1.2"><p id="EN-US_TOPIC_0000001188429080__a00293c10701c4f988fb93e3738dc65cc">Parameters for adding an account</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="37.72%" id="mcps1.3.4.2.4.3.4.2.5.1.3"><p id="EN-US_TOPIC_0000001188429080__a2a0ae6dd50db40ba98b763c25bde354a">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.36%" id="mcps1.3.4.2.4.3.4.2.5.1.4"><p id="EN-US_TOPIC_0000001188429080__a905695cf66b84f99812949320bbf8889">Value Range</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001188429080__r7bf562a8e5654dbab7ab59ce5f0bb1ed"><td class="cellrowborder" rowspan="3" valign="top" width="10.45%" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__afacd1c2badf4491d838033774a5cb8d3">ngram</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.47%" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__a1602af64ea7041beb6649bfe71f4820b">gram_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.72%" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><p id="EN-US_TOPIC_0000001188429080__aed94df95b88041a9a10cdee43386611c">Length of word segmentation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.36%" headers="mcps1.3.4.2.4.3.4.2.5.1.4 "><p id="EN-US_TOPIC_0000001188429080__a7e9de2a235d543ff8697fea360f2925b">Integer, 1 to 4</p>
|
|
<p id="EN-US_TOPIC_0000001188429080__afe2160e9d4014ed3ac7b3ef43ffa8f96">Default value: 2</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__r7d798f47f58b4e10a0f5dbad04811225"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__aa0f11d88fd444ef7b766d1978e6d0506">punctuation_ignore</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__a6e85a1422c2c404cb9be25a55c409814">Whether to ignore punctuations</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__u3760e23c2c2548b6884107ee9c424764"><li id="EN-US_TOPIC_0000001188429080__lac7bef9d53e34b80981fcfc9ca72fb78"><strong id="EN-US_TOPIC_0000001188429080__b1741281011447">true</strong> (default value): Ignore punctuations.</li><li id="EN-US_TOPIC_0000001188429080__l09785a75fd4646a0aa8fe2863e8fae11"><strong id="EN-US_TOPIC_0000001188429080__b3960213164413">false</strong>: Do not ignore punctuations.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__rc90448cf88f742a5aa8009acaf6762bd"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__a5aa3be441ec44ef297a77d676eafb179">grapsymbol_ignore</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__af34490045b234be3852684ef774bfb62">Whether to ignore graphical characters</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__u72a6d56c36c54d6598b26800fd6ca202"><li id="EN-US_TOPIC_0000001188429080__l1d582486cef64f18a7fa12e46fcc928d"><strong id="EN-US_TOPIC_0000001188429080__b9841225114415">true</strong>: Ignore graphical characters.</li><li id="EN-US_TOPIC_0000001188429080__le440959fa16442eea1adb8a9fc01a5d5"><strong id="EN-US_TOPIC_0000001188429080__b1336672754415">false</strong> (default value): Do not ignore graphical characters.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__r51369fd9e22f4c6cb6720ec7b23c768c"><td class="cellrowborder" rowspan="6" valign="top" width="10.45%" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__ac3abb7d7a915467c86d04e125953bd2c">zhparser</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.47%" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__af65f60184e354661a2fe4fdd030d35c9">punctuation_ignore</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.72%" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><p id="EN-US_TOPIC_0000001188429080__ad74db34457be4cfcb417c00446fcb317">Whether to ignore special characters including punctuations (\r and \n will not be ignored) in the word segmentation result</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.36%" headers="mcps1.3.4.2.4.3.4.2.5.1.4 "><ul id="EN-US_TOPIC_0000001188429080__uc090fd83a1914e788bfe6033c8f48d83"><li id="EN-US_TOPIC_0000001188429080__l268301dcf3f54412b04bd3bfcb2e50c5"><strong id="EN-US_TOPIC_0000001188429080__b1246518704511">true</strong> (default value): Ignore all the special characters including punctuations.</li><li id="EN-US_TOPIC_0000001188429080__lfbf91bb8d889414a932182891866ba71"><strong id="EN-US_TOPIC_0000001188429080__b16701121016453">false</strong>: Do not ignore all the special characters including punctuations.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__r7a3503ec9720437b99438ebebf39b07a"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__a12aa49ad78c34c4b994831fbe8fab566">seg_with_duality</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__a353074e455644960bf9ed7485554aeb7">Whether to aggregate segments with duality</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__ua1c3ede976f946be8501ed5439ed11aa"><li id="EN-US_TOPIC_0000001188429080__l0b5ee81361744ec194f4a1711b5316a3"><strong id="EN-US_TOPIC_0000001188429080__b98101123184516">true</strong>: Aggregate segments with duality.</li><li id="EN-US_TOPIC_0000001188429080__l5598b85a0c6743b282257ed2775a8c1e"><strong id="EN-US_TOPIC_0000001188429080__b3966182518458">false</strong> (default value): Do not aggregate segments with duality.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__r9d9514c2398848d2a99cd76297d36f84"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__a5698d88a2ef74eb5a2b0e3d1f5f1d171">multi_short</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__a251ec7730e69474e8e0acfb9273e8f57">Whether to execute long words composite divide</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__u4bfff92eb802417f8ee38e096824f010"><li id="EN-US_TOPIC_0000001188429080__l8b8935eb3dd9450190489d11c8d88a64"><strong id="EN-US_TOPIC_0000001188429080__b156241714124715">true</strong> (default value): Execute long words composite divide.</li><li id="EN-US_TOPIC_0000001188429080__lea6939d26b2a40adacb77851cdceb636"><strong id="EN-US_TOPIC_0000001188429080__b25301416144717">false</strong>: Do not execute long words composite divide.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__r51d91f3196a944aaa3e3420510906177"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__a2e44f85efdcd4633847aaf7c61467777">multi_duality</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__a67e8dc66192140ea9ee58206bdb75c1e">Whether to aggregate segments in long words with duality</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__u1a6f21947cf6484aab83fa00b8a4d4ac"><li id="EN-US_TOPIC_0000001188429080__l8be4353d97024efc9f2692e73ee0fb2d"><strong id="EN-US_TOPIC_0000001188429080__b126696241472">true</strong>: Aggregate segments in long words with duality.</li><li id="EN-US_TOPIC_0000001188429080__l2a5ffc4775e24b47bcb52d2e518e6219"><strong id="EN-US_TOPIC_0000001188429080__b1831152719475">false</strong> (default value): Do not aggregate segments in long words with duality.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__r35774d8cc947400f842c9a38aa4e28fb"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__a2b362917fba242bbb3dc3084b73c6714">multi_zmain</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__ad13f0cda635f4aa49f9920cff299a984">Whether to display key single words individually</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__ua24009a8c1604508939835fac9a51975"><li id="EN-US_TOPIC_0000001188429080__l5ae6e0ee7f6248869e6b16ef0bb1d7de"><strong id="EN-US_TOPIC_0000001188429080__b1863419381478">true</strong>: Display key single words individually.</li><li id="EN-US_TOPIC_0000001188429080__l4e808b7592e84a2e8fb0951f6bc04017"><strong id="EN-US_TOPIC_0000001188429080__b81181042194710">false</strong> (default value): Do not display key single words individually.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188429080__ra3024a409ab7469d9108ade908b94511"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001188429080__aac56d9c068a84364938635ad40e5a389">multi_zall</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001188429080__a41ffd96b834e4fdaacf3f0e21282f5a9">Whether to display all single words individually.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.3.4.2.5.1.3 "><ul id="EN-US_TOPIC_0000001188429080__u033d0a1dac154987a5f1b8a3a2e4e4ff"><li id="EN-US_TOPIC_0000001188429080__l232ea54069d24af28f810bd20258d9c9"><strong id="EN-US_TOPIC_0000001188429080__b2036805017472">true</strong>: Display all single words individually.</li><li id="EN-US_TOPIC_0000001188429080__l16aae6cef8224ae19264067a7308c83c"><strong id="EN-US_TOPIC_0000001188429080__b18900165213470">false</strong> (default value): Do not display all single words individually.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188429080__s38a364af36b74527a2ea2f15c2a7a5b7"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001188429080__p1694542219488">Create a text search configuration:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188429080__screen394512294819"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">DROP</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">ngram1</span><span class="p">;</span>
|
|
<span class="k">CREATE</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="n">ngram1</span><span class="w"> </span><span class="p">(</span><span class="n">parser</span><span class="o">=</span><span class="n">ngram</span><span class="p">)</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="p">(</span><span class="n">gram_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">grapsymbol_ignore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">false</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001188429080__p19946182214816">Create a text search configuration:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188429080__screen109468228487"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">DROP</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">ngram2</span><span class="p">;</span>
|
|
<span class="k">CREATE</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="n">ngram2</span><span class="w"> </span><span class="p">(</span><span class="k">copy</span><span class="o">=</span><span class="n">ngram1</span><span class="p">)</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="p">(</span><span class="n">gram_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">grapsymbol_ignore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">false</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001188429080__p494622216485">Create a text search configuration:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188429080__screen12946322114811"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">DROP</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">english_1</span><span class="p">;</span>
|
|
<span class="k">CREATE</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">SEARCH</span><span class="w"> </span><span class="n">CONFIGURATION</span><span class="w"> </span><span class="n">english_1</span><span class="w"> </span><span class="p">(</span><span class="n">parser</span><span class="o">=</span><span class="k">default</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188429080__se84e12ebaaf04ad6a3c20ec1ca7ee6e5"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001188429080__a08ce754f98384123b38da9f7e79b8a83"><a href="dws_06_0145.html">ALTER TEXT SEARCH CONFIGURATION</a>, <a href="dws_06_0210.html">DROP TEXT SEARCH CONFIGURATION</a></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0118.html">DDL Syntax</a></div>
|
|
</div>
|
|
</div>
|
|
|