In PostgreSQL, powerful Full Text Search is available out of the box
1–10 of 20 posts
Re: In PostgreSQL, powerful Full Text Search is available out of the box
#2Re: In PostgreSQL, powerful Full Text Search is available out of the box
#3It’s fantastic having 1 less dependency though!
One caveat- if you migrate any field in the indexed table, you will likely have to drop and recreate all your triggers and stored procs again
Re: In PostgreSQL, powerful Full Text Search is available out of the box
#4It does have one surprising limitation: it calculates relevance based on just the current row, rather than being able to take statistics across the whole corpus into account.
Most search engines use TF/IDF or BM25 for relevance calculations, which consider the relative common-ness of terms in comparison to the rest of the corpus. PostgreSQL FTS can't do that as far as I know.
SQLite's built-in FTS CAN do relevance calculations like this! Surprising to see a feature as significant as that show up in SQLite but not in PostgreSQL.
Re: In PostgreSQL, powerful Full Text Search is available out of the box
#5PostgreSQL FTS is mostly great - I wrote a tutorial on using it to build faceted search with Django a few years ago: https://simonwillison.net/2017/Oct/5/django-postgresql-facet... It does have one surprising limitation: it calculates relevance based on just the current row, rather than being able to take statistics across the whole corpus into account. Most search engines use TF/IDF or BM25 for relevance calculation…
Re: In PostgreSQL, powerful Full Text Search is available out of the box
#6Re: In PostgreSQL, powerful Full Text Search is available out of the box
#7Re: In PostgreSQL, powerful Full Text Search is available out of the box
#8Re: In PostgreSQL, powerful Full Text Search is available out of the box
#9Re: In PostgreSQL, powerful Full Text Search is available out of the box
#10The only problem I face is partial querying. For instance, if the user queries rus (and it does not match any lexemme) nothing returns. Any workarounds?