Loading...
Searching...
No Matches
ElasticSearchDocumentUpdateDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace ElasticSearchDataProvider {
class ElasticSearchDocumentUpdateDataProvider : public ElasticSearchDataProviderBase {
public:
const ProviderInfo = <DataProviderInfo>{
"name": "update",
"desc": "ElasticSearch document update API data provider",
"type": "ElasticSearchDocumentUpdateDataProvider",
"constructor_options": ElasticSearchDataProvider::ConstructorOptions,
"supports_request": True,
};
const ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
AbstractDataProvider::DataProviderSummaryInfoKeys
});
const RequestType = new ElasticSearchDocumentUpdateRequestDataType();
const ResponseType = new ElasticSearchDocumentUpdateResponseDataType();
const QueryArgs = ...;
constructor(*hash<auto> options);
constructor(RestClient::RestClient rest) ;
string getName();
*string getDesc();
protected:
auto doRequestImpl(auto req, *hash<auto> request_options);
public:
protected:
*DataProvider::AbstractDataProviderType getRequestTypeImpl();
public:
protected:
*DataProvider::AbstractDataProviderType getResponseTypeImpl();
public:
hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
};
class ElasticSearchDocumentUpdateRequestDataType : public DataProvider::HashDataType {
public:
protected:
const Fields = {
// query parameters
"index": {
"type": StringType,
"desc": "The name of the index to use",
},
"id": {
"type": StringType,
"desc": "The ID of the document to update",
},
"if_seq_no": {
"type": IntOrNothingType,
"desc": "Only perform the operation if the document has this sequence number",
},
"if_primary_term": {
"type": IntOrNothingType,
"desc": "Only perform the operation if the document has this primary term",
},
"lang": {
"type": StringOrNothingType,
"desc": "The script language (default `painless`)",
},
"require_alias": {
"type": SoftBoolStringType,
"desc": "If `true` (default `false`), the destination must be an index alias",
},
"refresh": {
"type": StringOrNothingType,
"desc": "If `true` (default `false`), Elasticsearch refreshes the affected shards to make this "
"operation visible to search, if `wait_for` then wait for a refresh to make this operation "
"visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`",
},
"retry_on_conflict": {
"type": IntOrNothingType,
"desc": "Specify how many times should the operation be retried when a conflict occurs (default `0`)",
},
"routing": {
"type": StringOrNothingType,
"desc": "Custom value used to route operations to a specific shard",
},
"_source": {
"type": StringOrNothingType,
"desc": "Set to `false` to disable source retrieval (default: `true`). You can also specify a "
"comma-separated list of the fields you want to retrieve",
},
"_source_excludes": {
"type": StringOrNothingType,
"desc": "Specify the source fields you want to exclude",
},
"_source_includes": {
"type": StringOrNothingType,
"desc": "Specify the source fields you want to exclude",
},
"timeout": {
"type": StringOrNothingType,
"desc": "Period to wait for the following operations:\n"
"- Dynamic mapping updates\n"
"- Waiting for active shards\n\n"
"This guarantees Elasticsearch waits for at least the timeout before failing. The actual wait "
"time could be longer, particularly when multiple waits occur (default `1m)",
},
"wait_for_active_shards": {
"type": StringOrNothingType,
"desc": "The number of shard copies that must be active before proceeding with the operation "
"(default `1`). Set to `all` or any positive integer up to the total number of shards in the "
"index (number_of_replicas+1)",
},
# body parameters
"script": {
"type": AutoType,
"desc": "the script to run",
},
"doc": {
"type": AutoHashOrNothingType,
"desc": "Updates the document with the given hash; ignored if `script` is also provided",
},
"detect_noop": {
"type": BoolOrNothingType,
"desc": "Ignore noops",
},
"doc_as_upsert": {
"type": BoolOrNothingType,
"desc": "Instead of sending a partial doc plus an upsert doc, you can set `doc_as_upsert` to `true` "
"to use the contents of `doc` as the upsert value",
},
"scripted_upsert": {
"type": BoolOrNothingType,
"desc": "To run the script whether or not the document exists",
},
"upsert": {
"type": AutoHashOrNothingType,
"desc": "Hash to insert as a new document if the document did not exist previously",
},
};
public:
constructor();
};
class ElasticSearchDocumentUpdateResponseDataType : public DataProvider::HashDataType {
public:
protected:
const Fields = {
"_index": {
"type": StringType,
"desc": "The name of the index the document was added to",
},
"_id": {
"type": StringType,
"desc": "The unique identifier for the added document",
},
"_version": {
"type": IntType,
"desc": "The document version. Incremented each time the document is updated",
},
"result": {
"type": StringType,
"desc": "The result of the indexing operation, `noop` or `updated`",
},
"_shards": {
"type": new ElasticSearchDocumentCreateShardsDataType(),
"desc": "Provides information about the replication process of the index operation",
},
"_seq_no": {
"type": IntType,
"desc": "The sequence number assigned to the document for the indexing operation. Sequence numbers "
"are used to ensure an older version of a document doesn’t overwrite a newer version",
},
"_primary_term": {
"type": IntType,
"desc": "The primary term assigned to the document for the indexing operation",
},
"get": {
"type": AutoHashOrNothingType,
"desc": "Information about the document after the update"
},
};
public:
constructor();
};
};
DataProvider::AbstractDataProviderType
DataProvider::HashDataType
ElasticSearchDataProvider::ElasticSearchDataProviderBase
The AWS REST client base data provider class.
Definition: ElasticSearchDataProviderBase.qc.dox.h:28
ElasticSearchDataProvider::ElasticSearchDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:61
ElasticSearchDataProvider::ElasticSearchDocumentCreateShardsDataType
Shard data type.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:185
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider
The ElasticSearch document update API data provider.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:30
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::ResponseType
const ResponseType
Response type.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:51
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::QueryArgs
const QueryArgs
Query args.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:54
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::constructor
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:34
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::RequestType
const RequestType
Request type.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:48
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::getDesc
*string getDesc()
Returns the data provider description.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::doRequestImpl
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::getName
string getName()
Returns the data provider name.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::getResponseTypeImpl
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::ProviderSummaryInfo
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:43
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::getRequestTypeImpl
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateRequestDataType
Update document request data type.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:106
ElasticSearchDataProvider::ElasticSearchDocumentUpdateRequestDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::ElasticSearchDocumentUpdateRequestDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:111
ElasticSearchDataProvider::ElasticSearchDocumentUpdateResponseDataType
Document update API response.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:215
ElasticSearchDataProvider::ElasticSearchDocumentUpdateResponseDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentUpdateDataProvider.qc.dox.h:220
ElasticSearchDataProvider::ElasticSearchDocumentUpdateResponseDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::SoftBoolStringType
Boolean string type.
Definition: ElasticSearchDataProvider.qc.dox.h:141
RestClient::RestClient
ElasticSearchDataProvider
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26