estonian
全文搜索配置 estonian。
当前查看 PostgreSQL 18。
中文定义与说明
全文搜索配置 estonian。
- 解析器
default- 配置
estonian
词元与词典映射
| 词元类型 | 顺序 | 词典 |
|---|---|---|
email | 1 | simple |
url | 1 | simple |
url_path | 1 | simple |
host | 1 | simple |
file | 1 | simple |
version | 1 | simple |
sfloat | 1 | simple |
float | 1 | simple |
int | 1 | simple |
uint | 1 | simple |
numword | 1 | simple |
hword_numpart | 1 | simple |
numhword | 1 | simple |
asciiword | 1 | estonian_stem |
hword_asciipart | 1 | estonian_stem |
asciihword | 1 | estonian_stem |
word | 1 | estonian_stem |
hword_part | 1 | estonian_stem |
hword | 1 | estonian_stem |
同版本中文手册节选
一个文本检索配置指定了将一个文档转换成一个 tsvector 所需的所有选项:用于把文本分解成词元的解析器,以及用于将每一个词元转换成词位的词典。每一次 to_tsvector 或 to_tsquery 的调用都需要一个文本检索配置来执行其处理。配置参数 default_text_search_config 指定了默认配置的名称,如果省略了显式的配置参数,文本检索函数将会使用它。它可以在 postgresql.conf 中设置,或者使用 SET 命令为一个单独的会话设置。
有一些预定义的文本检索配置可用,并且你可以容易地创建自定义的配置。为了便于管理文本检索对象,可以使用一组 SQL 命令,并且有多个 psql 命令可以显示有关文本检索对象(第 12.10 节)的信息。
作为一个示例,我们将创建一个配置 pg,从复制内置的 english 配置开始:
我们将使用一个 PostgreSQL 相关的同义词列表,并将它存储在 $SHAREDIR/tsearch_data/pg_dict.syn 中。文件内容看起来像:
说明
全文搜索配置 estonian。
- 配置
- estonian
- 解析器
- 默认
initdb 生成的定义
根据此版本的 Snowball 语言列表和 SQL 模板生成。
/*
* text search configuration for estonian language
*
* Copyright (c) 2007-2025, PostgreSQL Global Development Group
*
* src/backend/snowball/snowball.sql.in
*
* estonian and certain other macros are replaced for each language;
* see the Makefile for details.
*
* Note: this file is read in single-user -j mode, which means that the
* command terminator is semicolon-newline-newline; whenever the backend
* sees that, it stops and executes what it's got. If you write a lot of
* statements without empty lines between, they'll all get quoted to you
* in any error message about one of them, so don't do that. Also, you
* cannot write a semicolon immediately followed by an empty line in a
* string literal (including a function body!) or a multiline comment.
*/
CREATE TEXT SEARCH DICTIONARY estonian_stem
(TEMPLATE = snowball, Language = estonian );
COMMENT ON TEXT SEARCH DICTIONARY estonian_stem IS 'snowball stemmer for estonian language';
CREATE TEXT SEARCH CONFIGURATION estonian
(PARSER = default);
COMMENT ON TEXT SEARCH CONFIGURATION estonian IS 'configuration for estonian language';
ALTER TEXT SEARCH CONFIGURATION estonian ADD MAPPING
FOR email, url, url_path, host, file, version,
sfloat, float, int, uint,
numword, hword_numpart, numhword
WITH simple;
ALTER TEXT SEARCH CONFIGURATION estonian ADD MAPPING
FOR asciiword, hword_asciipart, asciihword
WITH estonian_stem;
ALTER TEXT SEARCH CONFIGURATION estonian ADD MAPPING
FOR word, hword_part, hword
WITH estonian_stem;词元到词典的映射
| 词元类型 | 顺序 | 词典 |
|---|---|---|
| 1 | 简单 | |
| url | 1 | 简单 |
| url_path | 1 | 简单 |
| host | 1 | 简单 |
| file | 1 | 简单 |
| version | 1 | 简单 |
| sfloat | 1 | 简单 |
| float | 1 | 简单 |
| int | 1 | 简单 |
| uint | 1 | 简单 |
| numword | 1 | 简单 |
| hword_numpart | 1 | 简单 |
| numhword | 1 | 简单 |
| asciiword | 1 | estonian_stem |
| hword_asciipart | 1 | estonian_stem |
| asciihword | 1 | estonian_stem |
| word | 1 | estonian_stem |
| hword_part | 1 | estonian_stem |
| hword | 1 | estonian_stem |
相关条目
文档与源码
来源构建
- 版本
- 18.6
- 构建
- https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
- 来源指纹
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
版本比较
PostgreSQL 17 → 18: 新增收录。
以下差异保留原始字段名与英文源描述。
--- PostgreSQL 17
+++ PostgreSQL 18
@@ -1 +1,100 @@
-该版未收录
+{
+ "mappings": [
+ {
+ "dictionary": "estonian_stem",
+ "sequence": "1",
+ "token": "asciihword"
+ },
+ {
+ "dictionary": "estonian_stem",
+ "sequence": "1",
+ "token": "asciiword"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "email"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "file"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "float"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "host"
+ },
+ {
+ "dictionary": "estonian_stem",
+ "sequence": "1",
+ "token": "hword"
+ },
+ {
+ "dictionary": "estonian_stem",
+ "sequence": "1",
+ "token": "hword_asciipart"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "hword_numpart"
+ },
+ {
+ "dictionary": "estonian_stem",
+ "sequence": "1",
+ "token": "hword_part"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "int"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "numhword"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "numword"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "sfloat"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "uint"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "url"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "url_path"
+ },
+ {
+ "dictionary": "simple",
+ "sequence": "1",
+ "token": "version"
+ },
+ {
+ "dictionary": "estonian_stem",
+ "sequence": "1",
+ "token": "word"
+ }
+ ],
+ "parser": "default"
+}
比较已记录的接口与属性,排除来源指纹和构建元数据。某个样本中没有记录,不能据此判断实际引入或移除的版本。
相关条目
导出 JSON · 返回全文检索组件 · 收录范围为 PostgreSQL 18 至 20;最早采样版本不一定是实际引入版本。