I am looking at using Full Text Search but not 100% clear on how to get it up with EF Core 2.1.
It seems that EF Core 2.1 might have implemented partial support for Full Text Search but I am not finding any tutorials on how actually use it.
My understanding is that I will have to add an Full Text index to one of my columns.
So if I have this table
public class Company {
public string Name {get; set;}
}
public class CompanyConfig : IEntityTypeConfiguration<Company>
{
public void Configure(EntityTypeBuilder<Company> builder)
{
builder.HasKey(x => x.Id);
builder.Property(x => x.Name).HasMaxLength(100).IsRequired();
}
}
How would I add full text index to my Name property?
context.Entity.FromSql("SELECT * FROM TableName WHERE CONTAINS(ColumnName, @p0)", "your text")
– Price