I have a table in DynamoDB that looks like this:
I added a global secondary index on "Category" to the table and it worked fine and gave me the number of items in the table under item count.
I then realized that i actually needed to be able to search for in a particular "Category" but sorted by "UserRating"
So I deleted the GSI and made a new one like this:
This all worked fine I thought, the names where correct the types (string) for Category and (number) for UserRating was correct.
But then after it finished creating the GSI I looked at the console and it is showing item count 0 even though there should be 13 in this testing table as pictured below:
Thanks for your help.
As per Amazon documentation this is being updated approx every 6 hours.
ItemCount - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
In my case, even though the console was still showing ItemCount
zero and was returning no results for scan/query of the index, I was able to successfully query it from my code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With