Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 802 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 802 Bytes

pubmed_es

Parse Pubmed XML into JSON and load it into Elasticsearch. See the Downloading Pubmed documentation for details on obtaining the XML files.

Installation

pubmed_es requires Python 3.7 or higher and Elasticsearch 7. Clone this repo, create a Python venv, and install the requirements.txt:

git clone https://github.com/paul-sud/pubmed-es.git
cd pubmed-es
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage

From the root of this repo, run the following to read and index the XML, where DATA_DIR points to a folder containing the XML files:

python -m pubmed_es -d $DATA_DIR