Indexing on nested field

前端 未结 1 784
予麋鹿
予麋鹿 2020-12-11 00:38

I\'m trying to create an index on a nested field, using the Dashboard in AWS Developer Console. E.g. if I have the following schema:

{ \'id\': 1,
  \'nested\         


        
相关标签:
1条回答
  • 2020-12-11 01:10

    You cannot (currently) create a secondary index off of a nested attribute. From the Improving Data Access with Secondary Indexes in DynamoDB documentation (emphasis mine):

    For each secondary index, you must specify the following:

    ...

    • The key schema for the index. Every attribute in the index key schema must be a top-level attribute of type String, Number, or Binary. Nested attributes and multi-valued sets are not allowed. Other requirements for the key schema depend on the type of index:

    You can, however, create an index on any top level JSON element.

    0 讨论(0)
提交回复
热议问题