A command line tool written in Python to help quickly populate json data into Elasticsearch.
es-indexer (Elasticsearch Indexer) is a simple concurrent command line tool written in Python to help you quickly populate some json data into Elasticsearch.
Usually you'll have to use a third-party software or a client library to index data to Elasticsearch and setting that up can be really time consuming and tiresome (coughlogstashcough). es-indexer helps in indexing raw contents of
*.json documents quickly with the help of multi-processing.
es-indexer currently doesn't provide any syncing of the data, you'll have to reindex the data if it changes, but will always populate a new index and then create an alias, the old data will be present while re-indexing until the new index is fully populated. A future update might include syncing.
Since Elasticsearch exposes a REST-API on Port 9200, there's no need for es-indexer providing a REST-API itself.
Requires Python 3.x and is compatible with Elasticsearch 7.x.x.
- es-indexer can be installed with the help of pip.
$ pip install es-indexer
Clone the repository.
$ git clone https://github.com/itsron717/es-indexer.git
Move inside the repo.
$ cd es-indexer
Install the package locally.
$ pip install .
You need to create a
config.yml before running es-indexer:
You can provide a custom mapping in the config file, es-indexer will convert the yaml mapping 1:1 to json.
$ es-indexer --config path/to/config/file --source path/to/json/folder
Adding more Data Sources
More data sources other than
json such as
Filesystem, etc are also to be added to the es-indexer tool such that it can be a one stop shop for all the indexing needs of Elasticsearch. Anybody who'd like to contribute in integrating other data sources can raise and issue and we can start working on it!.
SQLdata source integration.
FileSystemdata source integration.
- Increase the speed of indexing.
- Add tests.
es-indexer was built using the insipiration of this amazing tool written in Go.
The MIT License (MIT)
Copyright (c) 2019 Rounak Vyas
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.