Skip to content
Advertisement

Full text search failure on PostgreSQL

I have a PostgreSQL used to index text content. The SearchVector column is created successfully using the following code

The content looks like the following:

But if I try to run a query to get plurals or singular of manual (in Italian: manuale is one, manuali are 2 or more) it fails:

return nothing

return nothing

It only returns the record if I write exactly what is written in the searchvector field:

What’s wrong with it?

Advertisement

Answer

The problem is probably that the parameter default_text_search_configuration is not set to italian, so that a different stemming algorithm is used.

Be explicit and use to_tsquery('italian', 'manuali') rather than 'manuali'::tsquery.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement