Search code examples
pythongoogle-app-enginedatastore

appengine datastore - relationship between property and composite indexes


I have an Event model in my app with a "date_created" property. I always query on Event model with an ancestoer query. Hence my composite index looks like this:

- kind: Event
  ancestor: yes
  properties:
  - name: date_created
    direction: desc

My question is - can "date_created" be unindexed (ie. "indexed=False") and the query still function properly assuming that the composite index is sufficient?


Solution

  • No, you can't build composite indexes using properties that are set as unindexed.

    But see issue 4231, which was "escalated to the engineering team" last week, so there's hope.