A simple script that inserts JSON data to Elasticsearch index.
python main.py --index test_elastic_index --json_file test_elastic.json --from_elastic True
Here are the following arguments:
-
--host
: Host server of the destination elasticsearch default: localhost -
--port
: Port of the destination elasticsearch default: 9200 -
--index
: Name of the index where the data will be created. If the index exists the user will be prompted if the index will be recreated.default: test
-
--json_file
: Path of the json file input. This argument is required -
--from_elastic
: Set toTrue
if JSON file is from Elasticsearch query. default: False