<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 12.7\. 配置實例 文本搜索配置指定所有選項將文檔轉換成一個`tsvector`:使用解析器將文本分解為標記, 并且使用詞典將每個標記轉換為詞。`to_tsvector`或者`to_tsquery`的每一次調用需要一個文本搜索配置來執行處理。 如果一個明確的配置參數被省略,則配置參數[default_text_search_config](#calibre_link-1138)指定默認配置的名稱, 它是通過一個文本搜索函數使用的。它可以在`postgresql.conf`中設置,或使用`SET`命令設置一個獨立會話。 有幾個預定義的文本搜索配置是可用的,并且您可以很容易的創建自定義的配置。 為了方便文本搜索對象的管理,一組SQL命令是可用的, 有幾個psql命令可以顯示有關文本搜索對象的信息(節[Section 12.10](#calibre_link-1130))。 作為一個例子,我們將創建一個配置`pg`,通過復制內置`english`配置啟動: ``` CREATE TEXT SEARCH CONFIGURATION public.pg ( COPY = pg_catalog.english ); ``` 我們將使用PostgreSQL特定的同義詞列表并將其存儲在`$SHAREDIR/tsearch_data/pg_dict.syn`中。 文件內容看起來像: ``` postgres pg pgsql pg postgresql pg ``` 我們定義這樣的同義詞詞典: ``` CREATE TEXT SEARCH DICTIONARY pg_dict ( TEMPLATE = synonym, SYNONYMS = pg_dict ); ``` 接下來我們注冊Ispell詞典`english_ispell`,它有自己的配置文件: ``` CREATE TEXT SEARCH DICTIONARY english_ispell ( TEMPLATE = ispell, DictFile = english, AffFile = english, StopWords = english ); ``` 現在我們可以在配置`pg`中建立詞匯映射: ``` ALTER TEXT SEARCH CONFIGURATION pg ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part WITH pg_dict, english_ispell, english_stem; ``` 我們沒有選擇索引或搜索一些內置配置處理的標記類型: ``` ALTER TEXT SEARCH CONFIGURATION pg DROP MAPPING FOR email, url, url_path, sfloat, float; ``` 現在我們測試我們的配置: ``` SELECT * FROM ts_debug('public.pg', ' PostgreSQL, the highly scalable, SQL compliant, open source object-relational database management system, is now undergoing beta testing of the next version of our software. '); ``` 下一步是使用新的配置設置會話,這是在`public`模式中建立的: ``` => \dF List of text search configurations Schema | Name | Description ---------+------+------------- public | pg | SET default_text_search_config = 'public.pg'; SET SHOW default_text_search_config; default_text_search_config ---------------------------- public.pg ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看