Pagination is not supported in storage search, you should fetch all results and break it into pages yourself if you want to split the results across pages.
func (n *RuntimeGoNakamaModule) StorageIndexList(ctx context.Context, callerID, indexName, query string, limit int) (*api.StorageObjects, error) {
cid := uuid.Nil
if callerID != "" {
id, err := uuid.FromString(callerID)
if err != nil {
return nil, errors.New("expects caller id to be empty or a valid user id")
}
cid = id
}
if indexName == "" {
return nil, errors.New("expects a non-empty indexName")
}
if limit < 1 || limit > 100 {
return nil, errors.New("limit must be 1-100")
}
return n.storageIndex.List(ctx, cid, indexName, query, limit)
}
I found limit max is only 100âŚcan increase any way? @sesposito
this also need your help .thanks
Or can I modify the source code to change the number 100 to 1000 ?
Or will you support the offset feature soon? @sesposito
Weâve increased this limit to 10000 and weâll release Nakama 3.20 with these changes in the next few days.
1 Like
A player lists items for auction. For example, if a player lists 2 items, I want to generate 2 rows of data, but I found that StorageWrite can only write one piece of data per player. What is a good recommended method? Thanks @sesposito
You can use different storage write keys to write multiple objects in the same collection under the same user.
1 Like
thanksăkey can be different