Lets say a comments table has the following structure:
id | author | timestamp | body
I want to use index for efficiently execute the following query:
r.table('comments').getAll("me", {index: "author"}).orderBy('timestamp').run(conn, callback)
Is there other efficient method I can use?
It looks that currently index is not supported for a filtered result of a table. When creating an index for timestamp
and adding it as a hint in orderBy('timestamp', {index: timestamp})
I'm getting the following error:
RqlRuntimeError: Indexed order_by can only be performed on a TABLE. in:
John
orJane
. – Noxious