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