jaiminpan / pg_jieba

Postgresql full-text search extension for chinese
BSD 3-Clause "New" or "Revised" License
338 stars 65 forks source link

高亮丢词 #28

Closed cshuaimin closed 5 years ago

cshuaimin commented 6 years ago
> select ts_headline('jiebacfg', '高清下载', to_tsquery('jiebacfg', '高清下载'));
 ts_headline 
-------------
 <b>高清</b>
(1 row)

“下载”不见了。

jaiminpan commented 5 years ago

Reference Official Document of 12.3. Controlling Text Search . 12.3.4. Highlighting Results To present search results it is ideal to show a part of each document and how it is related to the query. Usually, search engines show fragments of the document with marked search terms. PostgreSQL provides a function ts_headline that implements this functionality. 也就是说 这个函数是表示摘要,摘要中的特定词高亮。既然是摘要。当然不是显示所有的内容

GuangliHan commented 1 year ago

@jaiminpan 2.0.1 pg_jieba上面问题,ts_headline 返回结果中会将动词给隐藏