# Need whole value column on "nk.StorageIndexList"

**URL:** <https://forum.heroiclabs.com/t/need-whole-value-column-on-nk-storageindexlist/6224>\
**Category:** Runtime Framework\
**Created:** [May 22, 2025, 5:25pm UTC](https://forum.heroiclabs.com/t/need-whole-value-column-on-nk-storageindexlist/6224 "2025-05-22T17:25:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtouso](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/virtouso/32/679_2.png) [@virtouso](https://forum.heroiclabs.com/u/virtouso)\
**Post date:** [May 22, 2025, 5:25pm UTC](https://forum.heroiclabs.com/t/need-whole-value-column-on-nk-storageindexlist/6224/1 "2025-05-22T17:25:33Z")

</div>

When I use this method, as part of the value, it only returns the queried field. So I need to again call “nk.StorageRead” to get the whole value. However, it’s certainly not a performant approach. It’s much simpler to get the whole data on the query.

this is my example:

```auto
func queryListModeled[T any](indexName string, query map[string]string, nk runtime.NakamaModule, ctx context.Context, logger runtime.Logger, order []string, limit int, callerId string) ([]T, bool) {

	finalQuery := queryHelper.MapToQueryString(query)
	data, err := nk.StorageIndexList(ctx, callerId, indexName, finalQuery, limit, order)

	var result []T
	if err != nil || len(data.Objects) == 0 {

		logger.Error("nakama storage read error: %v", err)
		return result, false
	}

	for _, item := range data.Objects {
		var data T

		keys := []*runtime.StorageRead{
			{
				Collection: item.Collection,
				Key: item.Key,
				UserID: item.UserId,
			},
		}

		storageReadResult, readError := nk.StorageRead(ctx, keys)

		if readError != nil || len(storageReadResult) == 0 {

			logger.Error("nakama storage read error: %v", err)
			return result, false
		}

		err = json.Unmarshal([]byte(storageReadResult[0].Value), &data)

		if err != nil {
			logger.Info("nakama unmarshal error:", err)
		}
		result = append(result, data)

	}

	return result, true

}

```

---

<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:** [May 23, 2025, 10:42am UTC](https://forum.heroiclabs.com/t/need-whole-value-column-on-nk-storageindexlist/6224/2 "2025-05-23T10:42:04Z")

</div>

@virtouso are you registering the index with `indexOnly` set to true? Because if that’s set to false, then the returned objects from the index’s List operation will contain the full value of the hits.

`indexOnly` is a very specific performance optimization that you likely don’t need, so I’d suggest you switch it to false.

Best.
