We using concatenation of ts_vectors to support multiple languages in some columns. In old versions it was like that:
public class AddTsVectorIndexes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(
@"CREATE INDEX ""Name_TsVector"" ON ""SomeTable"" USING GIN
(((to_tsvector('russian', ""Name"") || to_tsvector('english', ""Name"")) || to_tsvector('simple', ""Name"")));");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(@"DROP INDEX ""Name_TsVector"";");
}
}
Is there any way to concat ts_vectors with new sugar syntax of expression index added in Npgsql 5(docs)?
Or maybe there is a way to create multilang ts_vector dictionary for parsers and just use it as config for creation ts_vectors and ts_query?