Query ordered by LastModified does not work as expected (with the example)

Hello,

Just installed the v2 to test purpose.
Trying to play with the “new queries system” .

First observation on the default main page.

Sorting by “LastModified” doesn’t work as deployed or not as it is supposed to work, it does the reverse and can be quite confusing for beginners (or people like me)

The example says :

Using SilverBullet’s Lua APIs, you can do all kinds of cool stuff. For instance, query your space for the last 3 modified pages. _Exciting!_

${query[[ from index.tag "page" order by lastModified limit 3 ]] }

This does the opposite and displays the 3 files that were edited the latest (I mean the 3 files that what not edited …)

To really print the 3 latest files edited we need to add desc

${query[[ from index.tag "page" order by lastModified desc limit 3]] }

Like this it really orders the page with the lastest modified files.

From my point of view this is a bit “counter intuitive” , because the keywork “lastModified” is clear .. and it does the reverse ..

This looks like a documentation bug that I will raise a pull request to fix.

The term lastModified is quite conventional in the tech space and doesn’t indicate the order in which a page was modified but rather the date/time it was “last modified” (i.e. the date/time of the most recent modification).

Apologies if you already understand that but I wasn’t sure.