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

How to Query on Global Secondary Index? #50

Open
chantii opened this issue Nov 23, 2014 · 4 comments
Open

How to Query on Global Secondary Index? #50

chantii opened this issue Nov 23, 2014 · 4 comments

Comments

@chantii
Copy link

chantii commented Nov 23, 2014

Hi, Along with primary hash key I also created a Global secondary hash key, how can I query using node-dynamodb?

@nijo108
Copy link

nijo108 commented Apr 21, 2015

same ? here doesn't seem to work for me when I use indexName option

@yeshodhan
Copy link

Could you provide an example?

@christopheretcheverry
Copy link

Hey, is there any resolution on this yet? I'm finding that when you use indexName it still queries on the table hash key and not the index hash key.

@christopheretcheverry
Copy link

Here is a temporary fix. You have to upgrade to a newer version of dynamo for this to work. I'm working on a pull request.

This will break the "HashKeyElement" as it was changed to "Key" so be careful! I've included details on how to fix that also.

https://gist.github.com/christopheretcheverry/bff4f26ea365c7487f33

Chris

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

No branches or pull requests

4 participants