Elasticsearch Interface

src.elasticsearch.create_doc_index.upload_docs(qa_pairs)

adds document with qa pair to elastic index assumes that index fields correspond to template in create_doc_index.py

Parameters:
  • full_text – full text of document containing answer
  • qa_pairs – list of dictionaries with key:value=’ans_id’:integer, ‘ans_str’:str, ‘query_str’=str, ‘query_id’=integer
Returns:

document and qa_pair indexed to Elastic