question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`.query()` is not working

See original GitHub issue

Cat.query("breed").contains("Terrier").exec() will error:

Index can’t be found for query.

@fishcharlie wrote:

Dynamoose currently requires an index, but DynamoDB does not require an index when querying

I can confirm it works when I add an index to the schema, even tho I dont query for the index. But if I add an additional condition the same error occurs.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jdrydncommented, Apr 15, 2021

@arizonatribe Check out “Working with DynamoDB Queries” for more detail, but I’m afraid there’s no logic for hashKey IN ? or hashKey = ? OR hashKey = ?. If your table is not using range keys then you’d be able to use BatchGetItem to fetch multiple items in one operation, but AFAIK it’s a design/structural decision in DynamoDB so there’s no solution here.

1reaction
jdrydncommented, May 18, 2020

From what I can tell, this has fixed eq but not in:

Cat.query({ breed: { in: [ 'Terrier' ] } }).exec()

InvalidParameter: Index can’t be found for query.

Happy to dig into this further, right now I’m using model.scan instead of model.query 🤷‍♂️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access query not working? - Stack Overflow
Create a new empty database and import table1 into it. Try your query in the new database. If it works there, you know...
Read more >
Mysql query not working - DBA Stack Exchange
I'm currently reading this book on how to use MySQL with python and would like to know why this query from the book...
Read more >
Handling data source errors (Power Query) - Microsoft Support
Advice on how to identify, deal with, and resolve errors from externals data sources and Power Query when you refresh data.
Read more >
Using the Right Query | FacetWP
If FacetWP isn't filtering correctly, it's because FacetWP is using the wrong query. To find which query FacetWP is using, go to Settings...
Read more >
Troubleshoot Issues with Bridge - Tableau Help
Data sources that use live queries and Bridge (legacy) schedules (which includes schedules created with Bridge 2020.1 and earlier) continue to display in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found