Ayende,
I wasn't going to do such a simple index, but I have a need to be able to reset the data in my db back to an initial/original state.
I thought that the only way for me to remove all documents of a certain type in one database call was to use a command like this:
// Delete old days
session.Query<DayOfMonth, DayOfMonths_AllDaysSortedByOrder>().Customize(x => x.WaitForNonStaleResults()).Take(0).ToList();
session.Advanced.DatabaseCommands.DeleteByIndex("DayOfMonths/AllDaysSortedByOrder", new IndexQuery { }, false);
So, I added the index merely to get all documents of type "DayOfMonth", but then I thought I may as well use it for getting all the documents for display in my application as well, so I thought to add a sort index on it.
If there is another way I can delete all documents of a specific type in one database call, I will gladly do that instead. =)
I am a total RavenDB newb, so thanks for your patient explanations!