Twint: Elasticsearch setup Connect to custom Endpoint not Localhost

Created on 14 May 2019  路  2Comments  路  Source: twintproject/twint

Hello, How Can I setup my Elasticsearch to my server? I dont know exactly the line I need to modify I mean:



es = Elasticsearch(["c97a616987f58b3a2d7c1c48412d6674.us-central1.gcp.cloud.es.io"],
    port=45458,
    http_auth="jon doe:jon doe",
    use_ssl=True,
    verify_certs=True,
    ca_certs=certifi.where()
)

All I see is Elasticsearch is Attached to a config
In elasticsarch.py I see that config is Attached to a parameter, I'm a little bit confused, I appreciate any help

question

Most helpful comment

Thank you very much I had to figure out Because the mapping was not the same in 6.xx in Kibana and I had to replace config.py and elasticsearch.py as you stated, but now is Solved thank you very much

All 2 comments

You have just to modify this line
https://github.com/twintproject/twint/blob/d8ad621dc9fb2ba3ff8408feddc8c459bb4147c2/twint/storage/elasticsearch.py#L248
replace the default 'es' with your custom one.

If your settings will not change often, you could just replace the entire line. But remember to state config.Elasticsearch = True (or any other string) to properly call the functions to index the tweets

Thank you very much I had to figure out Because the mapping was not the same in 6.xx in Kibana and I had to replace config.py and elasticsearch.py as you stated, but now is Solved thank you very much

Was this page helpful?
0 / 5 - 0 ratings