 <p>I did some poking around and it didn't seem like there was an easy way of doing this. I think to do it effectively you would probably need your own C functions which could provide a distance from one tsvector to another (then you could use KNN searches).</p> <p>Either way there is not a very easy way to do this and it is likely a significant amount of work, but it seems like it should be a generally applicable problem so the general community might be interested in a solution.</p> <p>Note this is not as trivial as it sounds. Suppose I write a book about Albert Lord's the Singer of Tales and his emphasis on poetic formulas. Suppose I call it "Albert Lord and the Ring of Words." This would create a tsvector of <code>Albert:1 Lord:2 Ring:5 Words:7</code>, The Lord of the Rings is <code>Lord:2 Ring:5</code> which would create a very false sense of similarity. If you have any categorization involved, you would want to leverage that as well.</p>