Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 使用同义词表时保留原始术语_Postgresql_Full Text Search_Postgresql 9.3 - Fatal编程技术网

Postgresql 使用同义词表时保留原始术语

Postgresql 使用同义词表时保留原始术语,postgresql,full-text-search,postgresql-9.3,Postgresql,Full Text Search,Postgresql 9.3,www.postgresql.org/docs/9.3/static/textsearch-dictionaries.html上的文档说明: 基本上,同义词库词典将所有非首选术语替换为一个首选术语,还可以选择保留原始术语以进行索引 不过,我看不到任何保留原有条款的选择 例如: # SELECT to_tsvector('supernovae stars'); to_tsvector ------------- 'sn':1 (1 row) “选项”包括复制同义词库中的原始术语 如果您进一

www.postgresql.org/docs/9.3/static/textsearch-dictionaries.html上的文档说明:

基本上,同义词库词典将所有非首选术语替换为一个首选术语,还可以选择保留原始术语以进行索引

不过,我看不到任何保留原有条款的选择

例如:

# SELECT to_tsvector('supernovae stars');
 to_tsvector 
-------------
 'sn':1
(1 row)
“选项”包括复制同义词库中的原始术语

如果您进一步阅读同义词库示例中的页面,您将在文档中提到这一点:

要索引原始短语和替代词,只需包含 它位于定义的右侧部分:

词库条目:

supernovae stars : sn supernovae stars 超新星:锡超新星 结果:

SELECT plainto_tsquery('supernova star'); plainto_tsquery ----------------------------- 'sn' & 'supernova' & 'star' 选择plainto_tsquery(“超新星”); 普莱托查 ----------------------------- “sn”和“超新星”和“恒星”