'Build a full-text index'

@staticmethod
def document_onaccept(form):

    form_vars = form.vars
    doc = form_vars.file
    table = current.db.doc_document
    document = json.dumps(dict(filename=doc, name=table.file.retrieve(doc)[0], id=form_vars.id))
    current.s3task.async('document_create_index', args=[document])
