index = search.Index(name='item_autocomplete')
for item in items:
    name = ','.join(tokenize_autocomplete(item.name))
document = search.Document(doc_id=item.key.urlsafe(), fields=[search.
    TextField(name='name', value=name)])
index.put(document)
Partial matching GAE search API