简体   繁体   中英

Get data from Scroll in http request api elasticsearch

I'm trying to write a code in python to get all the data from an api through an http request.

I am wondering if there is a way to use the _scroll_id and it's contents in python. If so, how do I implement it or could you share some documentation regarding it?

All the documentation regarding elasticsearch in python is using a localhost...

Any leads would be highly appreciated.

Elasticsearch has a Python library that helps with pinging the database.

You can use the scan() helper function. Internally, it calls the scroll API so you don't have to worry about any of that.

For the last part of your question, you'd have to follow the tutorial to see how to connect to different databases.

https://elasticsearch-py.readthedocs.io/en/v8.3.3/helpers.html#scan

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM