Automatically included index whether include create_time

Base on doc: Storage Search - Heroic Labs Documentation

there are 4 list build-in index

  • update_time
  • key
  • user_id
  • version

may i aks whether the create_time already include in that list?

because I see the source code ::

seem like include all these field or what i understand is wrong and only those 4 fields?

{Details}

  1. Versions: Nakama {3.5}, {Windows, Mac, Linux binary or Docker}, {client library (SDK) and version}
  2. Server Framework Runtime language (If relevant) {Go, TS/JS, Lua}
{code or log snippet}

:tv: Media:

Hello @mengxin, yes it is indeed stored, we’ll update the docs accordingly.

@gabriel can we please add the following missing fields to the list:

create_time
read
write
collection

1 Like

thanks, btw may i ask there is no way to contribute the doc after switch to the new doc framework without using the github repo right?

Currently there’s no way to receive public contributions to our docs, please point out any issues here and we’ll do our best to update them. We may change this in the future but it’s not a priority at the moment.

may i ask create_time whether support the Unix Timestamp?

such as create_time:>1718369044?

i tried, but get error:

{"level":"error","ts":"2024-06-14T13:06:22.132Z","caller":"server/runtime_javascript.go:575","msg":"JavaScript runtime function raised an uncaught exception","mode":"rpc","id":"s2s_crm_mailbox_mail_global_query","error":"GoError: failed to lookup storage index: parse error: invalid time: parsing time \"1718369044\" as \"2006-01-02T15:04:05Z07:00\": cannot parse \"369044\" as \"-\" at github.com/heroiclabs/nakama/v3/server.(*runtimeJavascriptNakamaModule).mappings.(*runtimeJavascriptNakamaModule).storageIndexList.func156 (native)"}

seem like there is time parse process, but return error:

1718369044 is valid Unix Timestamp as second:

Assuming that this timestamp is in seconds :
GMT : Friday, 14 June 2024 12:44:04
Your time zone : Friday, 14 June 2024 20:44:04 GMT+08:00
Relative : 26 minutes ago

i also find an issue:

if i use the create_time like this:

create_time:>"2024-06-14T12:56:46+00:00"

the result seem like include the data whose create_time == 2024-06-14T12:56:46+00:00

but the query is > without =

meanwhile, can i query a range of time such as > t1 and <= t2

"create_time:>"2024-06-14T12:44:04+00:00" create_time:<="2024-06-14T13:16:12+00:00\

I tried, seem like get result separately include all data

got answer: need appedn + before create_time