collection.Indexes.CreateOne(Builders<searchFileByAuthor>.IndexKeys.Text(x=>x.subject));
collection.Find(Builders<searchFileByAuthor>.Filter.Text("coffe")).ToList();
public class searchFileByAuthor
{
public int Id { get; set; }
public string subject { get; set; }
}