Skip to content

Commit d713ee1

Browse files
authored
Improve docs on local secondary indexes (#849)
1 parent e5e2ff3 commit d713ee1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/indexes.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ Local secondary indexes are defined just like global ones, but they inherit from
9494
forum = UnicodeAttribute(hash_key=True)
9595
view = NumberAttribute(range_key=True)
9696
97-
98-
You must specify the same hash key on the local secondary index and the model. The range key can be any attribute.
99-
97+
Every local secondary index must meet the following conditions:
98+
- The partition key (hash key) is the same as that of its base table.
99+
- The sort key (range key) consists of exactly one scalar attribute. The range key can be any attribute.
100+
- The sort key (range key) of the base table is projected into the index, where it acts as a non-key attribute.
100101

101102
Querying an index
102103
^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)