Search code examples
pythonelasticsearchkibanakibana-4pyelasticsearch

Elastic Search Index in python


I want to push my data from a dictionary to Elasticsearch. How can I create an index for the same?

I tried using the Curl commands as well on Linux server curl -XPUT 'http://localhost:9200/osint/' -d ' index: number_of_shards: 5 number_of_replicas: 2 ' but this also didnt help out

I wrote this but couldn't fetch data through KibanaHud with index osint :

es.index(index='osint', doc_type='tweet', body=dict, id = 1)

es.indices.refresh(index='osint')

Can you please help


Solution

  • Did you try

    curl -XGET http://localhost:9200/<index>/_mapping?pretty
    

    I think you are missing on this