Reputation: 5142
Say, I have a dynamodb with following schema:
{
Field1: “”,
Field2: “”,
Field3: “”,
Field4: “”,
Field5: “”
}
Can I write a query in dynamo which will do filtering on 3 or more fields: field2, field3, field4 by creating indexes on some other way?
Upvotes: 0
Views: 237
Reputation: 3991
With this schema, No, but you can use composite sort key or Index as below
Primary key: Field1
Sort key: Field2#Field3#Field4
then if the result is not very large, using Scan operation for filter more fields.so its depend on your data structure. the composite sort key is good for hierarchical data scenario.
Upvotes: 1