Search API: How do I specify the ancestor for a document when adding to an 
index. The index in index.yaml looks like this:

- kind: abc
  ancestor: yes
  properties:
  - name: date_time
    direction: desc


Currently, this is how I add a document to an index:

from google.appengine.api import search
fields = []
d = search.Document(fields = fields,doc_id=some_id)
index = search.Index(name='abc').put(d)


As you can see, I can specify the fields and the doc_id, but not the 
ancestor. 
Perhaps I have not understood how this works very well.

I do understand that there is a workaround where I can add the ancestor key 
as a prefix in the doc_id. But I would like to know FIRST if there is an 
option already to specify an ancestor

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to