停用词是很常见的词,几乎出现在每一个文档中,并且没有区分值。因此,在全文搜索的语境下可忽视它们。例如,每一段英文文本都包含a和the,因此将其存储在索引中是没有用的。然而,停用词影响tsvector中的位置,同时位置也会影响相关度:
gbase=# SELECT to_tsvector('english','in the list of stop words');
to_tsvector
----------------------------
'list':3 'stop':5 'word':6
(1 row)
位置1、2、4是停用词,所以不显示。