The Full text search of postgres includes some of these functions to search: plainto_tsquery, to_tsquery and to_tsvector . I don't get the difference between it, the results contain the same words always, but in tsvector it is detached with the number of position of that word.
SELECT plainto_tsquery('simple', 'The & Fat & Rats');
result will be like this: plainto_tsquery: 'fat' & 'rat' to_tsquery: 'fat' & 'rat' to_tsvector: 'fat':2 'rat':3
I have tried longer queries, but i haven't found a bigger difference than that.
I already read the documentation, but I didnt get the difference there either.
I am happy for any help.