Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More descriptive error message for "Indexed order_by can only be performed on a TABLE or TABLE_SLICE" #4656

Open
danielcompton opened this issue Aug 10, 2015 · 2 comments
Labels
Milestone

Comments

@danielcompton
Copy link
Contributor

I was running

r.db('local_ip').table('todos').filter({list: "home"}).orderBy({index: 'title'})

and got the error:

RqlRuntimeError: Indexed order_by can only be performed on a TABLE or TABLE_SLICE in:
r.db("local_ip").table("todos").filter({list: "home"}).orderBy({index: "title"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This was a confusing error to me, as I thought I was operating on a TABLE. After doing some search I understand the issue with secondary indexing and why this doesn't work. I think it would be helpful for users if the error message explained what type the indexed order_by was trying to operate on if it wasn't a TABLE, and maybe link to more docs about this.

@mlucy mlucy added this to the 2.1-polish milestone Aug 10, 2015
@mlucy mlucy added the cp:reql label Aug 10, 2015
@mlucy
Copy link
Member

mlucy commented Aug 10, 2015

Thanks for opening an issue. I think you're right that we can probably make the error message clearer.

@danielmewes danielmewes modified the milestones: 2.1-polish, 2.2-polish Aug 11, 2015
@danielmewes danielmewes modified the milestones: 2.2-polish, subsequent Aug 27, 2015
@sanchopanca
Copy link

I agree, very confusing message. Link to documentation in error message would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants