Class for use of Elasticsearch Scroll API.
More...
#include <scroll.h>
|
| Scroll (const std::shared_ptr< Client > &client, std::size_t scrollSize=100, const std::string &scrollTimeout="1m") |
|
| Scroll (const std::vector< std::string > &hostUrlList, std::size_t scrollSize=100, const std::string &scrollTimeout="1m", std::int32_t connectionTimeout=6000) |
|
| Scroll (Scroll &&) |
|
void | clear () |
| Clear scroll for next usage. Should be called immediately after last next() was called.
|
|
void | init (const std::string &indexName, const std::string &docType, const std::string &searchBody) |
|
bool | next (Json::Value &parsedResult) |
|
const std::shared_ptr< Client > & | getClient () const |
| Return Client class with current config.
|
|
|
virtual bool | createScroll (Json::Value &parsedResult) |
| Creates new scroll - obtain scrollId and parsedResult.
|
|
|
std::unique_ptr< Implementation > | impl |
| Hidden implementation and data holder.
|
|
Class for use of Elasticsearch Scroll API.
◆ Scroll() [1/2]
elasticlient::Scroll::Scroll |
( |
const std::shared_ptr< Client > & |
client, |
|
|
std::size_t |
scrollSize = 100 , |
|
|
const std::string & |
scrollTimeout = "1m" |
|
) |
| |
|
explicit |
Initialize class for usage of Elasticsearch scroll API.
- Parameters
-
client | initialized Client object. |
scrollSize | number of results per one scroll "page". |
scrollTimeout | time during scroll search context remaining alive. Defined by Elastic Time Units (i.e. 1m = 1 minute). |
◆ Scroll() [2/2]
elasticlient::Scroll::Scroll |
( |
const std::vector< std::string > & |
hostUrlList, |
|
|
std::size_t |
scrollSize = 100 , |
|
|
const std::string & |
scrollTimeout = "1m" , |
|
|
std::int32_t |
connectionTimeout = 6000 |
|
) |
| |
|
explicit |
Initialize class for usage of Elasticsearch scroll API and create Client instance for specified hostUrlList and timeout.
- Parameters
-
hostUrlList | list of URLs of Elastic nodes in one cluster. |
scrollSize | number of results per one scroll "page". |
scrollTimeout | time during scroll search context remaining alive. Defined by Elastic Time Units (i.e. 1m = 1 minute). |
timeout | Elasticsearch node connection timeout. |
◆ init()
void elasticlient::Scroll::init |
( |
const std::string & |
indexName, |
|
|
const std::string & |
docType, |
|
|
const std::string & |
searchBody |
|
) |
| |
Initialize new Scroll search.
- Parameters
-
indexName | specification of an Elasticsearch index. |
docType | specification of an Elasticsearch document type. |
searchBody | Elasticsearch query body. |
◆ next()
bool elasticlient::Scroll::next |
( |
Json::Value & |
parsedResult | ) |
|
Scroll next (get next bulk of results) and parse it into parsedResult
.
- Returns
- true if okay
-
false on error
The documentation for this class was generated from the following file:
- /home/runner/work/elasticlient/elasticlient/include/elasticlient/scroll.h