google.appengine.datastore.datastore_index.IndexYamlForQuery

Returns the composite index definition YAML needed for a query.

Given a query, the arguments for this method can be computed with:

  _, kind, ancestor, props = datastore_index.CompositeIndexForQuery(query)
  props = datastore_index.GetRecommendedIndexProperties(props)

kind The kind or None.
ancestor True if this is an ancestor query, False otherwise.
props PropertySpec objects.

A string with the YAML for the composite index needed by the query.