Reputation: 13952
I am using to_tsvector
, and it works fine... But a new demand, to preserve exact original words (raw text), need "bypass" as dictionary.
... something like to use to_tsvector('raw', myString)
where myString
is something like "AATT GAA", no meaning for any dictionary.
Upvotes: 3
Views: 2537
Reputation: 3008
Just in case anyone else coming here is looking to really manually create a ts_vector you can skip using to_tsvector entierly (even with the simple dictionary it still sends it through the parser and drops spaces/punctuation e.g. ```to_tsvector('simple', '\Sigma^0_1') breaks that text up into three lexmes 0, 1 and sigma)
As described in this part of the manual and this answer. You simply do this
$$' space containing lexeme ' ' and one with position and weight'5c$$::tsvector;
Upvotes: 0