我的AbstractIndexCreationTask
应用程序中有一个如下:
public class EventsForMainQueries : AbstractIndexCreationTask<Event>
{
public EventsForMainQueries()
{
Map = docs => from doc in docs
select new
{
DatePublished = doc.DatePublished,
IsDeleted = doc.IsDeleted,
Author = doc.Author,
EventDate = doc.EventDate
};
Index(x => x.DatePublished, FieldIndexing.Default);
Sort(x => x.DatePublished, SortOptions.String);
Index(x => x.EventDate, FieldIndexing.Default);
Sort(x => x.EventDate, SortOptions.String);
}
}
但是,RavenDB 仍在创建以下自动索引。
我需要在 IndexCreationTask 中进行哪些更改以防止生成临时/自动索引?