public void Multiple_sorts_desc() { var idx = new IndexEntry(); idx.Field("birthDate"); idx.Field("name"); Database.Index.Create(idx); List <Person> results; List <Person> reference; using (var session = Database.CreateSession()) { results = session.Query <Person>().OrderByDescending(x => x.BirthDate).ThenByDescending(x => x.Name).ToList(); reference = Query <Person>().OrderByDescending(x => x.BirthDate).ThenByDescending(x => x.Name).ToList(); } Assert.IsTrue(results.Count == reference.Count); Assert.IsTrue(results.First().Name == reference.First().Name); Assert.IsTrue(results.Skip(1).First().Name == reference.Skip(1).First().Name); Assert.IsTrue(results.Skip(2).First().Name == reference.Skip(2).First().Name); }