title: dynamodb index does not return all data
body: <p>I have a table <code>storedgames</code>, which contains 2092 items.</p>
  
  <p><a href="https://i.stack.imgur.com/yUY94.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yUY94.png" alt="table"></a></p>
  
  <p>And it also has an index on that table, which also lists 2092 items.</p>
  
  <p><a href="https://i.stack.imgur.com/IXfQz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IXfQz.png" alt="user-index"></a></p>
  
  <p>when I fetch data, I use the index, to obtain the items for one specific user.</p>
  
  <pre><code>const params = {
    TableName: "storedgames",
    IndexName: "user-index",
    KeyConditionExpression: "#usr = :usr",
    ExpressionAttributeNames: { "#usr": "user" },
    ExpressionAttributeValues: { ":usr": user }
  };
  
  const data = await new Promise((resolve, reject) =&gt; {
    docClient.query(params, (err, data) =&gt; {
      if (err) { reject(err); } else { resolve(data); }
    });
  }).catch((err) =&gt; {
    console.error(err);
    return false;
  });
  </code></pre>
  
  <p>However, the above code does not return all items. It only finds 42. And for today's items there is only 1 hit. When I check directly on the AWS webpage, I actually find more items for today.</p>
  
  <p><a href="https://i.stack.imgur.com/cNNTu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cNNTu.png" alt="more items on webpage in table"></a></p>
  
  <p>And even when I do this using the index, it finds more records.</p>
  
  <p><a href="https://i.stack.imgur.com/pYveo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pYveo.png" alt="more items on webpage using index"></a></p>
  
  <p>When I leave out the filtering of the day, I actually find over 130 items,
  while my javascript code only returns 42 items when I leave out the day filter.</p>
  
  <p><a href="https://i.stack.imgur.com/0QWEu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0QWEu.png" alt="130 vs 42 items"></a></p>
  
  <hr>
  
  <p>So my question is, why does the data of my index seem to be incomplete when I call it programmatically ?</p>