Really strange, made a simplified test to reproduce this, but it worked correctly.
As a last resort I added an index:
mongoTemplate.ensureIndex("collection", new Index("clicks",...
Type: Posts; User: jelinden; Keyword(s):
Really strange, made a simplified test to reproduce this, but it worked correctly.
As a last resort I added an index:
mongoTemplate.ensureIndex("collection", new Index("clicks",...
Yes, I've tried, the result is the same.
For some reason the sort with date is always the number one sort.
Behauviour of these are exactly the same:
query.sort().on("date",...
I have two fields I want to sort with
(order by clicks descending, date descending)
query.sort().on("clicks", Order.DESCENDING);
query.sort().on("date", Order.DESCENDING);
With this it...