Full Text Search Documentation
Hi,
first of all thanks for the wonderful documentation under https://www.npgsql.org/efcore/mapping/full-text-search.html
I configured the it as described for the version 10 database, but used the 'german' language in the tsvector_update_trigger function. Worked like a charm for all "ascii" words, but for a name like "Björn" i do not get any results.
I think, the problem is the call:
.Where(p => p.SearchVector.Matches("Björn"))
should be language dependant, like:
.Where(p => p.SearchVector.Matches(EF.Functions.ToTsQuery("german", "Björn")))
If I'm right, perhaps it would nice to document that, so that others don't do the same mistake like me?
Thanks a lot for the best database connector in the dot net core world :-)
Thanks for the positive feedback, it's great to hear the provider is working well for you!
As a general rules, the provider docs simply provide translations from a .NET construct to its equivalent SQL - the query config is well-documented in the PostgreSQL docs, and we don't really want to repeat that. Another way of looking at this is that a new user reading the intro docs may stumble on the same problem in direct PostgreSQL without using Npgsql.
But I'll take a look - maybe adding a Matches overload with a string (or at least improving the docs) makes sense here.