Loading...
Searching...
No Matches
ElasticSearchDocumentReadDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace ElasticSearchDataProvider {
class ElasticSearchDocumentReadDataProvider : public ElasticSearchDataProviderBase {
public:
const ProviderInfo = <DataProviderInfo>{
"name": "read",
"desc": "ElasticSearch document read API data provider",
"type": "ElasticSearchDocumentReadDataProvider",
"constructor_options": ElasticSearchDataProvider::ConstructorOptions,
"supports_request": True,
};
const ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
AbstractDataProvider::DataProviderSummaryInfoKeys
});
const RequestType = new ElasticSearchDocumentReadRequestDataType();
const ResponseType = new ElasticSearchDocumentReadResponseDataType();
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 ElasticSearchDocumentReadRequestDataType : public DataProvider::HashDataType {
public:
protected:
const Fields = {
// query parameters
"index": {
"type": StringType,
"desc": "The name of the index holding the document to read",
},
"id": {
"type": StringType,
"desc": "The ID of the document to read",
},
"preference": {
"type": StringOrNothingType,
"desc": "Specifies the node or shard the operation should be performed on; random by default",
},
"realtime": {
"type": SoftBoolStringType,
"desc": "If `true` (the default), the request is real-time as opposed to near-real-time",
},
"refresh": {
"type": SoftBoolStringType,
"desc": "If `true` (default `false`), the request refreshes the relevant shard before retrieving the "
"document",
},
"routing": {
"type": StringOrNothingType,
"desc": "Custom value used to route operations to a specific shard",
},
"stored_fields": {
"type": SoftBoolStringType,
"desc": "If `true` (default `false`), retrieves the document fields stored in the index rather than "
"the document `_source`",
},
"_source": {
"type": StringOrNothingType,
"desc": "`true` or `false` to return the `_source` field or not, or a list of fields to return",
},
"_source_excludes": {
"type": StringOrNothingType,
"desc": "A comma-separated list of source fields to exclude from the response.\n\n"
"You can also use this parameter to exclude fields from the subset specified in the "
"`_source_includes` query parameter.\n\n"
"If the `_source` parameter is `false`, this parameter is ignored",
},
"_source_includes": {
"type": StringOrNothingType,
"desc": "A comma-separated list of source fields to include in the response.\n\n"
"If this parameter is specified, only these source fields are returned. You can exclude fields "
"from this subset using the `_source_excludes` query parameter.\n\n"
"If the `_source` parameter is `false`, this parameter is ignored",
},
"version": {
"type": IntOrNothingType,
"desc": "Explicit version number for concurrency control. The specified version must match the "
"current version of the document for the request to succeed",
},
"version_type": {
"type": StringOrNothingType,
"desc": "Specific version type: `external`, `external_gte`",
},
};
public:
constructor();
};
class ElasticSearchDocumentReadResponseDataType : 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",
},
"found": {
"type": BoolType,
"desc": "Indicates whether the document exists: `true` or `false`",
},
"_routing": {
"type": StringOrNothingType,
"desc": "The explicit routing, if set",
},
"_source": {
"type": StringOrNothingType,
"desc": "If `found` is `true`, contains the document data formatted in JSON. Excluded if the "
"`_source` parameter is set to `false` or the `stored_fields` parameter is set to `true`",
},
"_fields": {
"type": StringOrNothingType,
"desc": "If the `stored_fields` parameter is set to `true` and `found` is `true`, this will contain "
"the document fields stored in the index",
},
"_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",
},
};
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::ElasticSearchDocumentReadDataProvider
The ElasticSearch document read API data provider.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:30
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::ProviderSummaryInfo
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:43
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::doRequestImpl
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::getRequestTypeImpl
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::getResponseTypeImpl
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::getName
string getName()
Returns the data provider name.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::ResponseType
const ResponseType
Response type.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:51
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:34
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::RequestType
const RequestType
Request type.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:48
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::QueryArgs
const QueryArgs
Query args.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:54
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::constructor
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
ElasticSearchDataProvider::ElasticSearchDocumentReadDataProvider::getDesc
*string getDesc()
Returns the data provider description.
ElasticSearchDataProvider::ElasticSearchDocumentReadRequestDataType
Document read API request data type.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:106
ElasticSearchDataProvider::ElasticSearchDocumentReadRequestDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::ElasticSearchDocumentReadRequestDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:111
ElasticSearchDataProvider::ElasticSearchDocumentReadResponseDataType
Document read API response.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:180
ElasticSearchDataProvider::ElasticSearchDocumentReadResponseDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::ElasticSearchDocumentReadResponseDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:185
ElasticSearchDataProvider::SoftBoolStringType
Boolean string type.
Definition: ElasticSearchDataProvider.qc.dox.h:141
RestClient::RestClient
ElasticSearchDataProvider
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26