PostgreSQL full text search giving different results for different database version

I am trying to use Postgres full text search with my Django project in order to search for products in my database. The shop_products table has a GIN index field search_vector. I also currently have two databases, with one being the production server that is hosted on AWS RDS (PostgreSQL 14.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit) and the other being my local development database (Version PostgreSQL 14.2, compiled by Visual C++ build 1914, 64-bit).

The issue I am having is that some search results work normally on the development server but not on the production server. For example, when I am looking for products with the word 'extreme' in them using the following query SELECT * FROM shop_products WHERE search_vector @@ websearch_to_tsquery('extreme');

Both of the databases have the exact same indexing where 'extreme' is stored as 'extrem' in the database, and searching for 'extrem' in both databases returns the same results. So is the reason for this the different PostgreSQL versions or is something else possible affecting the search results?

Apparenty the default search query config was different, and setting them in my django file to config="english" fixed the issue.

Back to Top