original_docstring: Index a single document in current collection.
docstring: Index a single document in current collection.
docstring_tokens: Index a single document in current collection .
code: def index(id, data):
      """Index a single document in current collection."""
      es_index = collections.current().es_index
  
      index_url = f'{ES_URL}/{es_index}'
      resp = put_json(f'{index_url}/{DOCUMENT_TYPE}/{id}', data)
  
      check_response(resp)
code_tokens: def index ( id , data ) : es_index = collections . current ( ) . es_index index_url = f'{ES_URL}/{es_index}' resp = put_json ( f'{index_url}/{DOCUMENT_TYPE}/{id}' , data ) check_response ( resp )
short_docstring: Index a single document in current collection.
short_docstring_tokens: Index a single document in current collection .
comment: """Index a single document in current collection."""