# How to create index about json object?

**URL:** <https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689>\
**Category:** Runtime Framework\
**Tags:** storage\
**Created:** [December 5, 2023, 5:48am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689 "2023-12-05T05:48:32Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [December 14, 2023, 10:21am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/21 "2023-12-14T10:21:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hexun80149128](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/hexun80149128/32/1395_2.png) [@hexun80149128](https://forum.heroiclabs.com/u/hexun80149128)\
**Post date:** [December 14, 2023, 10:30am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/22 "2023-12-14T10:30:15Z")

</div>

> [@hexun80149128](#):
>
> StorageIndexList

```auto
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

---

<div class="post-metadata">

**Author:** ![hexun80149128](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/hexun80149128/32/1395_2.png) [@hexun80149128](https://forum.heroiclabs.com/u/hexun80149128)\
**Post date:** [December 14, 2023, 10:30am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/23 "2023-12-14T10:30:47Z")

</div>

this also need your help .thanks

---

<div class="post-metadata">

**Author:** ![hexun80149128](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/hexun80149128/32/1395_2.png) [@hexun80149128](https://forum.heroiclabs.com/u/hexun80149128)\
**Post date:** [December 14, 2023, 10:45am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/24 "2023-12-14T10:45:21Z")

</div>

Or can I modify the source code to change the number 100 to 1000 ? 😇  
Or will you support the offset feature soon? @sesposito

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [December 14, 2023, 12:22pm UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/25 "2023-12-14T12:22:40Z")

</div>

We’ve increased this limit to 10000 and we’ll release Nakama 3.20 with these changes in the next few days.

---

<div class="post-metadata">

**Author:** ![hexun80149128](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/hexun80149128/32/1395_2.png) [@hexun80149128](https://forum.heroiclabs.com/u/hexun80149128)\
**Post date:** [December 15, 2023, 12:01am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/26 "2023-12-15T00:01:55Z")

</div>

> [@hexun80149128](#):
>
> Can I use jsnb such as {“userid”:xxx,“auctionid”:yyy} to store it under user\_id? Any better recommendations? @sesposito thanks

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

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [December 15, 2023, 10:02am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/27 "2023-12-15T10:02:49Z")

</div>

You can use different storage write keys to write multiple objects in the same collection under the same user.

---

<div class="post-metadata">

**Author:** ![hexun80149128](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/hexun80149128/32/1395_2.png) [@hexun80149128](https://forum.heroiclabs.com/u/hexun80149128)\
**Post date:** [December 15, 2023, 10:13am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689/28 "2023-12-15T10:13:54Z")

</div>

thanks。key can be different 😃

[Previous page](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689.md?page=1)
