.Where(p => EF.Functions.ToTsVector("english", p.Title + " " + p.Description).Matches("Npgsql"))
As I've come to understand expression indexes, they require the query to include an identical expression as was used to create the index. In the docs this is
""Name"" || ' ' || ""Description"".
However it seems to me that
p.Title + " " + p.Description would be evaluated before being translated to SQL as ToTsVector takes a plain string:
public static NpgsqlTsVector ToTsVector(this DbFunctions _, string config, string document);
Am I wrong or will the index not be utilized? If I am not wrong, is there some way to query correctly other than by using raw SQL?