the*_*iko 6 postgresql full-text-search ispell
我正在为 Postgresql 8.4 构建一个定制的 ispell 字典配置,并且在正确解析带有撇号的单词时遇到一些问题。Postgresql 中包含的 ispell 字典包含一个 .affix 文件,其中包含一个“M”SFX 规则,该规则指定其单词的扩展形式。
这是一个例子,假设dictionary/SM我的字典文件中有:
SELECT to_tsvector('english_ispell', 'dictionary''s dictionaries');
预期输出:
'dictionary':1,2
实际产量:
s':2, 'dictionary':1,3
我做错了什么吗?这是 ts_debug 的输出,显示其解析方式。
SELECT * FROM ts_debug('english_ispell', 'dictionary''s dictionaries');
alias | description | token | dictionaries | dictionary | lexemes
-----------+-----------------+--------------+-------------------------------+----------------+--------------
asciiword | Word, all ASCII | dictionary | {english_ispell,english_stem} | english_ispell | {dictionary}
blank | Space symbols | ' | {} | |
asciiword | Word, all ASCII | s | {english_ispell,english_stem} | english_ispell | {s}
blank | Space symbols | | {} | |
asciiword | Word, all ASCII | dictionaries | {english_ispell,english_stem} | english_ispell | {dictionary}
Run Code Online (Sandbox Code Playgroud)
如何让 Postgresql 将 the 解析'为单个单词的一部分而不将其分解为“空格符号”?
| 归档时间: |
|
| 查看次数: |
1353 次 |
| 最近记录: |