title: DynamoDB schema for querying nearby coordinates
body: <p>I'm struggling with DynamoDB schema design of a table storing locations.  The table will have [userId, lastUpdatedTime, locationGooglePlaceId, longitude, latitude, hideOnUI(bool)]</p>
  
  <p>one of the main query is given user current location (x, y) as GPS coordinate, query nearby userId based on their longitude and latitude.</p>
  
  <p>The problem is how would I design index for this purpose?  The table itself can have HASH key UserId, SORT key lastUpdatedTime; but how would GSI go?  I seem can't identify any partition key for "equal" operation</p>
  
  <p>In SQL it'll be something like:</p>
  
  <p>select * from table 
  where x-c &lt;= longitude and longitude &lt; x+c
  AND y-c &lt;= latitude and latitude &lt; y+c</p>
  
  <p>Thanks  </p>