FAQs - NoSQL Explorer

I get an error when performing operations on my collection - 'This action could not be executed. Please check your parameters'. Why is this happening?

This error is typically caused by one of two things:

How do I query a field containing a date object?

There are two ways you can do this:

{"myField":{"$gt":{"$date":"2019-01-07T00:00:00.000Z"}}}

{"myField":{"$gt":{"$date":1546819200000}}}

How do I check if a document id is contained in an array of document ids?

The correct syntax to use for this type of operation is:

{"_id":{"$in":[{"$oid":"5c3376a52b3e9205036a0a3f"},
{"$oid":"5c3376a22df4fe0505ab5e5f"},
{"$oid":"5c33594d2b3e92050331bf2a"},
{"$oid":"5c33594d2b3e92050331bf25"}]}}

Note that the most common mistake made when doing this is to attempt to query the $oid field with an array of strings, instead of querying the _id field with an array of objects.

Is it safe for me to update, remove, or drop any System collections?

No. We strongly advise against any direct modification of System collections, because this can lead to unexpected behavior. The data in System collections should only be modified via our Requests or the APIs provided in Cloud Code.

Can I mirror the Player Collection and make it searchable?

Yes. You can mirror this system collection using the Game Data Service (GDS) and make it searchable. Please see the Mirroring the Player Collection for a detailed example of how to do this.

I changed a stored value to 'y' using the Explorer but I'm still getting the previous stored value 'x' returned when I try to retrieve the value in Cloud Code soon after making the change. Why is this happening?

This is normal behavior. The Explorer operates on a secondary database. It can take some time for changes applied in the Explorer to propagate to the primary database.

Can I view my Cloud Code logs using the Explorer?

Yes. The log collection can be found under Collections > Runtime > script.log. To view your logs ordered by most recent, you can use the following in the Sort field:

{"ts":-1}

Did this page help you? Please enter your feedback below.