BUG #17043: Full text search - to_tsvector treating a full stop wrong

Started by PG Bug reporting formalmost 5 years ago1 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17043
Logged by: James Inform
Email address: james.inform@pharmapp.de
PostgreSQL version: 13.3
Operating system: Mac and Ubuntu
Description:

It seems that to_tsvector is treating full stops wrong. If a sentence end
with a '.' and the following word isn't separated by a space, to_tsvector
will identify it as one lexeme:

select to_tsvector('english','This is the rat.Fat is she!')
'rat.fat':4

select to_tsvector('english','This is the rat. Fat is she!')
'fat':5 'rat':4

select to_tsvector('english','This is the rat.Fat is she!') @@
websearch_to_tsquery('fat')
false

select to_tsvector('english','This is the rat. Fat is she!') @@
websearch_to_tsquery('fat')
true