Reputation: 5547
I have the following index created for RavenDB.
public class DayOfMonths_AllDaysSortedByOrder : AbstractIndexCreationTask<DayOfMonth, DayOfMonth>
{
public DayOfMonths_AllDaysSortedByOrder()
{
Map = days => from day in days select new { day };
Sort(x => x.Order, Raven.Abstractions.Indexing.SortOptions.Int);
}
}
However, when I get the documents for this index, they are not returned in proper sorted order. What have I done wrong?
Upvotes: 1
Views: 571
Reputation: 34297
Is it possible that your Map line should be like this?
Map = days => from day in days select new { day.Order };
Upvotes: 4