How can you emulate Solr "more like this query" with Postgresql full-text search?

I would like to emulate this type of Solr request:

http://wiki.apache.org/solr/MoreLikeThis

with PostgreSQL using full-text search.

Is there a way to do something like a β€œmore similar” request with pure postgres?

+5
source share
1 answer

Out of the box, I'm afraid. It is possible to compare two tsvectors to determine if they are the same enough or to output the top n similar tsvectors, but there is no functionality for this. The good news is that since tsvectors support GIN indexing, the hard part is done for you.

, C, tsvectors. , , , . , .

, , , C, , , , .

PostgreSQL , . , , , , .

+1

All Articles