On Jul 15, 10:09 pm, gibeon <gibeon... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,
I built a secondary index with a custom sort function. It works well
(I can traverse the index by the sort order). However, I wonder how to
traverse the index by a reverse order.
Is it possible?
Thanks. |
Sure. If you are using the C or C++ API, then you
are already using DB->cursor() to get a cursor and iterate using
the DB_NEXT flag. (right?) To go in reverse, you use DB_PREV
instead of DB_NEXT.
Don't be tempted to change the custom sort function.
- Don