Search code examples
postgresqltsvector

Is there a simple method to remove the occurrence of lexeme in a tsvector?


I've got a tsvector column in a table and I would like to be able to remove a lexeme from the tsvector.

I've started playing around with ts_stat to rebuild a new tsvector, but it seems quite complicated.

Is there a simple way to do it?


Solution

  • Cast it to text, remove with regexp, and cast back to tsvector.