getBulk- Links withing a document to other documents(has-many)

Hi,
Say I have a primary document which consists of Player information and i have interlinked another document(Player abilities). Now, I want to retrieve player abilities document using the player(document). I planned to use Multi-get(getBulk) in java.

But it retrieves only the parent(player) document and not the player_ab01 document.Any one implemented in java with this method(getBulk) ??

PLAYER_01{
"name":"xxx",
"status":"active",
"abilities":["player_ab01","player_ab02",.....]}

PLAYER_AB01{
"firepower":56,"life":89
}

1 Answer

« Back to question.

Hello,

As you can see from the documentation the getBulk() method takes a list of keys as parameters.

The client will get all the document/values associated with these keys.

The getBulk operation does not do anything with the JSON content that has the list of linked items. This is why you have to extract the list of keys from the JSON documents and do the getBulk() on this list.

Is it clear?

Regards
Tug
@tgrall

Thank you for your reply. Now i got clear idea about multi-get ie..
I have to make two calls, first read call to get the primary document and from that second call(getBulk) using the keys i got from primary document.