Go to the documentation of this file.
31 virtual std::string
indexName()
const = 0;
34 virtual bool empty()
const = 0;
37 virtual std::size_t
size()
const = 0;
40 virtual std::string
body()
const = 0;
51 std::unique_ptr<Implementation> impl;
64 virtual std::string
indexName()
const override;
74 const std::string &
id,
75 const std::string &doc);
87 const std::string &
id,
88 const std::string &doc,
99 const std::string &
id,
100 const std::string &doc);
112 const std::string &
id,
113 const std::string &doc,
124 const std::string &docType,
125 const std::string &
id,
126 const std::string &doc);
138 const std::string &docType,
139 const std::string &
id,
140 const std::string &doc,
147 virtual bool empty()
const override;
150 virtual std::size_t
size()
const override;
153 virtual std::string
body()
const override;
159 class Implementation;
160 std::unique_ptr<Implementation> impl;
167 Bulk(
const std::shared_ptr<Client> &client);
175 Bulk(
const std::vector<std::string> &hostUrlList,
176 std::int32_t connectionTimeout);
196 const std::shared_ptr<Client> &
getClient()
const;
virtual std::string body() const =0
Return elasticsearch bulk request data.
std::size_t perform(const IBulkData &bulk)
std::size_t getErrorCount() const
Return number of errors in last bulk being ran.
Interface for Bulk data collector classes.
Definition: bulk.h:23
virtual std::string body() const override
Return elasticsearch bulk request data.
bool createDocument(const std::string &docType, const std::string &id, const std::string &doc)
Bulk(const std::shared_ptr< Client > &client)
SameIndexBulkData(const std::string &indexName, std::size_t size=100)
const std::shared_ptr< Client > & getClient() const
Return Client class with current config.
Class for bulk document indexing.
Definition: bulk.h:158
The elasticlient namespace.
Definition: bulk.h:15
virtual bool empty() const override
Return true if bulk has no data inside.
bool indexDocument(const std::string &docType, const std::string &id, const std::string &doc)
virtual std::string indexName() const override
Return index name set during contruction.
void clear()
Clear bulk (size() == 0 after this).
virtual std::size_t size() const override
Return number of documents inside the bulk.
virtual std::size_t size() const =0
Return number of documents inside the bulk.
bool updateDocument(const std::string &docType, const std::string &id, const std::string &doc)
virtual bool empty() const =0
Return true if bulk has no data inside.
virtual std::string indexName() const =0
Class for managing Elasticsearch connection in one Elasticsearch cluster.
Definition: client.h:35