Skip to content

State of "excludeFromIndexes" (datastore) #2770

@sebelga

Description

@sebelga

Hello,

I have seen that since version 1.1.0 of the datastore api there is a new syntax for the "excludeFromIndexes" allowing embedded entities to have their properties excluded from indexes.

I am wondering if this new syntax is currently supported as it is not yet in the "master" documentation (it only appears under the "1.1.0" version).

I am sending the following payload to save an entity but all of the properties are marked as "indexed" in the google cloud console. Thus the "excludeFromIndexes" is not working as expected.

{
    "key": {
        "namespace": "my.namespace",
        "kind": "MyEntity",
        "path": [
            "MyEntity",
            null
        ]
    },
    "data": [
        {
            "name": "systems",
            "value": {
                "a": "123c",
                "b": "456c"
            }
        },
        {
            "name": "phoneNumber",
            "value": "0123456789"
        },
        {
            "name": "createdAt",
            "value": "2017-12-12T06:16:35.145Z"
        }
    ],
    "excludeFromIndexes": [
        "phoneNumber",
        "systems",
        "createdAt",
        "systems.a",
        "systems.b"
    ]
}

Thank for any help on this!

Metadata

Metadata

Labels

api: datastoreIssues related to the Datastore API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions