[openspending-dev] Ordering with order=time:desc doesn't always work

Vitor Baptista vitor at vitorbaptista.com
Mon Aug 6 22:59:34 UTC 2012


Hi,

I'm working on #478 (http://github.com/openspending/openspending/issues/478),
and the first version is already online (
http://openspending.org/datasets/entries).

I've set up the search to sort by time:desc (
https://github.com/openspending/openspendingjs/commit/df4a53cbdc7ce1155f3bcbaee7b73f61a5b14c23)
but, depending on the dataset, it doesn't work. For example, searching for
Microsoft returns 705 entries (
http://openspending.org/api/2/search?q=Microsoft). If you try to apply this
ordering, as expected, it also returns 705 entries, but the results array
is empty (http://openspending.org/api/2/search?q=Microsoft&order=time:desc).
If you try other ordering (amount, for example), it's OK (
http://openspending.org/api/2/search?q=Microsoft&order=amount:desc).

Some other queries work, doesn't matter the ordering:
http://openspending.org/api/2/search?q=cameroon&order=time:desc.

Maybe the server is still indexing?

Cheers!
Vítor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20120806/c7e228aa/attachment.html>


More information about the openspending-dev mailing list