My dynamoDB index is flooding with huge data. I would like to choose values that could be indexed and avoid indexing the rest. Is this possible?
Lets say, below are the sample items:
parent item:
{
"hashKey":"a1"
"indexHashKey":"parentType"
"indexRangeKey":"date1"
}
child item:
{
"hashKey":"a2"
"indexHashKey":"childType"
"indexRangeKey":"date11"
}
In my use case, I am always going to ask index to fetch only parentType records. The index is getting loaded with huge data because the childTypes are also getting indexed (and thats the nature). I would like to choose specific values (lets say 'parentType1', 'parentType2') to get indexed in dynamoDB. Is there any feature dynamoDB provides for this purpose?
Alternative: If there is no such capability dynamoDB provides, then I should either
* avoid storing the child type of the item. But it would be good to have the child type stored.
or
* Maintain two different fields. One to store parent record type and another to store child record type. This looks ugly.
Any suggestions would be helpful.