doc-exports/docs/dws/dev/dws_06_0086.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
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>
2024-05-16 07:24:04 +00:00

16 lines
3.4 KiB
HTML

<a name="EN-US_TOPIC_0000001188110554"></a><a name="EN-US_TOPIC_0000001188110554"></a>
<h1 class="topictitle1">Configurations</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001188110554__en-us_topic_0059779006_p485651714118">Full text search functionality includes the ability to do many more things: skip indexing certain words (stop words), process synonyms, and use sophisticated parsing, for example, parse based on more than just white space. This functionality is controlled by text search configurations. <span id="EN-US_TOPIC_0000001188110554__text1766477143">GaussDB(DWS)</span> comes with predefined configurations for many languages, and you can easily create your own configurations. (The <strong id="EN-US_TOPIC_0000001188110554__en-us_topic_0058965793_b842352706145730">\dF</strong> command of <strong id="EN-US_TOPIC_0000001188110554__b171161259142311">gsql</strong> shows all available configurations.)</p>
<p id="EN-US_TOPIC_0000001188110554__a2d73d980fcca4cb88eaadee0e7ecf534">During installation an appropriate configuration is selected and <strong id="EN-US_TOPIC_0000001188110554__b842352706145947">default_text_search_config</strong> is set accordingly in <strong id="EN-US_TOPIC_0000001188110554__b842352706145951">postgresql.conf</strong>. If you are using the same text search configuration for the entire cluster you can use the value in <strong id="EN-US_TOPIC_0000001188110554__b8423527061504">postgresql.conf</strong>. To use different configurations throughout the cluster but the same configuration within any one database, use ALTER DATABASE ... SET. Otherwise, you can set <strong id="EN-US_TOPIC_0000001188110554__b84235270615150">default_text_search_config</strong> in each session.</p>
<p id="EN-US_TOPIC_0000001188110554__a780e51b3bbbe4320bffbb04182be573c">Each text search function that depends on a configuration has an optional argument, so that the configuration to use can be specified explicitly. <strong id="EN-US_TOPIC_0000001188110554__b84235270615232">default_text_search_config</strong> is used only when this argument is omitted.</p>
<p id="EN-US_TOPIC_0000001188110554__aa5d0645f4c34439fba6536221230d8a0">To make it easier to build custom text search configurations, a configuration is built up from simpler database objects. <span id="EN-US_TOPIC_0000001188110554__text1622196251">GaussDB(DWS)</span>'s text search facility provides the following types of configuration-related database objects:</p>
<ul id="EN-US_TOPIC_0000001188110554__ufdeebd6959c54fad8028ef90408f1786"><li id="EN-US_TOPIC_0000001188110554__ledd5348c91f9454b94e29350770dc5f6">Text search parsers break documents into tokens and classify each token (for example, as words or numbers).</li><li id="EN-US_TOPIC_0000001188110554__l16d8c55f291148078cba4a1b7da5a4fa">Text search dictionaries convert tokens to normalized form and reject stop words.</li><li id="EN-US_TOPIC_0000001188110554__lfdcfaa8fff0e40dfa1cc40e03228f934">Text search templates provide the functions underlying dictionaries. (A dictionary simply specifies a template and a set of parameters for the template.)</li><li id="EN-US_TOPIC_0000001188110554__l9c6f6b59a824424982c89958813d9726">Text search configurations select a parser and a set of dictionaries to use to normalize the tokens produced by the parser.</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0082.html">Introduction</a></div>
</div>
</div>