sort order

In this query:

[lua]  local answer = coronium.mongo:getObjects( “ratings”, {}, 10, “total”, “DESC” ) [/lua]

i is the result sorted before or after the limit? That is, does Coronium go to “rating,” sort it in DESC order, then return 10 objects, or does it grab 10 objects, sort those in DESC order, and return them?

Hi Kevin,

That Module is actually being re-written due to some misunderstandings of how Mongo searches work (my bad), which should create a more consistent/expected output.

But I think you are correct in your observation. I will see if there is an easy work-around, or put together a patch.

Cheers.

Hi Kevin,

That Module is actually being re-written due to some misunderstandings of how Mongo searches work (my bad), which should create a more consistent/expected output.

But I think you are correct in your observation. I will see if there is an easy work-around, or put together a patch.

Cheers.