Last active
August 29, 2015 14:10
-
-
Save geetanjaligg/00cfb422de4f7cf4def3 to your computer and use it in GitHub Desktop.
Read json file and index in ElasticSearch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rawes #install rawes. pip install rawes | |
es = rawes.Elastic('localhost:9200') | |
#index each line | |
with open('sample.json','r') as f: | |
for line in f: | |
es.post('index_name/index_type',data=line) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment