Qore ElasticSearchDataProvider Module Reference 1.0
Loading...
Searching...
No Matches
ElasticSearchDocumentReadDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
28
31
32public:
34 const ProviderInfo = <DataProviderInfo>{
35 "name": "read",
36 "desc": "ElasticSearch document read API data provider",
37 "type": "ElasticSearchDocumentReadDataProvider",
39 "supports_request": True,
40 };
41
43 const ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
44 AbstractDataProvider::DataProviderSummaryInfoKeys
45 });
46
49
52
54 const QueryArgs = ...;
55
56
58 constructor(*hash<auto> options);
59
60
63
64
66 string getName();
67
68
70 *string getDesc();
71
72
74
79protected:
80 auto doRequestImpl(auto req, *hash<auto> request_options);
81public:
82
83
85
87protected:
89public:
90
91
93
95protected:
97public:
98
99
101 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
102
103};
104
107
108public:
109protected:
111 const Fields = {
112 // query parameters
113 "index": {
114 "type": StringType,
115 "desc": "The name of the index holding the document to read",
116 },
117 "id": {
118 "type": StringType,
119 "desc": "The ID of the document to read",
120 },
121 "preference": {
122 "type": StringOrNothingType,
123 "desc": "Specifies the node or shard the operation should be performed on; random by default",
124 },
125 "realtime": {
126 "type": SoftBoolStringType,
127 "desc": "If `true` (the default), the request is real-time as opposed to near-real-time",
128 },
129 "refresh": {
130 "type": SoftBoolStringType,
131 "desc": "If `true` (default `false`), the request refreshes the relevant shard before retrieving the "
132 "document",
133 },
134 "routing": {
135 "type": StringOrNothingType,
136 "desc": "Custom value used to route operations to a specific shard",
137 },
138 "stored_fields": {
139 "type": SoftBoolStringType,
140 "desc": "If `true` (default `false`), retrieves the document fields stored in the index rather than "
141 "the document `_source`",
142 },
143 "_source": {
144 "type": StringOrNothingType,
145 "desc": "`true` or `false` to return the `_source` field or not, or a list of fields to return",
146 },
147 "_source_excludes": {
148 "type": StringOrNothingType,
149 "desc": "A comma-separated list of source fields to exclude from the response.\n\n"
150 "You can also use this parameter to exclude fields from the subset specified in the "
151 "`_source_includes` query parameter.\n\n"
152 "If the `_source` parameter is `false`, this parameter is ignored",
153 },
154 "_source_includes": {
155 "type": StringOrNothingType,
156 "desc": "A comma-separated list of source fields to include in the response.\n\n"
157 "If this parameter is specified, only these source fields are returned. You can exclude fields "
158 "from this subset using the `_source_excludes` query parameter.\n\n"
159 "If the `_source` parameter is `false`, this parameter is ignored",
160 },
161 "version": {
162 "type": IntOrNothingType,
163 "desc": "Explicit version number for concurrency control. The specified version must match the "
164 "current version of the document for the request to succeed",
165 },
166 "version_type": {
167 "type": StringOrNothingType,
168 "desc": "Specific version type: `external`, `external_gte`",
169 },
170 };
171
172public:
173
176
177};
178
181
182public:
183protected:
185 const Fields = {
186 "_index": {
187 "type": StringType,
188 "desc": "The name of the index the document was added to",
189 },
190 "_id": {
191 "type": StringType,
192 "desc": "The unique identifier for the added document",
193 },
194 "_version": {
195 "type": IntType,
196 "desc": "The document version. Incremented each time the document is updated",
197 },
198 "found": {
199 "type": BoolType,
200 "desc": "Indicates whether the document exists: `true` or `false`",
201 },
202 "_routing": {
203 "type": StringOrNothingType,
204 "desc": "The explicit routing, if set",
205 },
206 "_source": {
207 "type": StringOrNothingType,
208 "desc": "If `found` is `true`, contains the document data formatted in JSON. Excluded if the "
209 "`_source` parameter is set to `false` or the `stored_fields` parameter is set to `true`",
210 },
211 "_fields": {
212 "type": StringOrNothingType,
213 "desc": "If the `stored_fields` parameter is set to `true` and `found` is `true`, this will contain "
214 "the document fields stored in the index",
215 },
216 "_seq_no": {
217 "type": IntType,
218 "desc": "The sequence number assigned to the document for the indexing operation. Sequence numbers "
219 "are used to ensure an older version of a document doesn’t overwrite a newer version",
220 },
221 "_primary_term": {
222 "type": IntType,
223 "desc": "The primary term assigned to the document for the indexing operation",
224 },
225 };
226
227public:
228
231
232};
233};
The AWS REST client base data provider class.
Definition: ElasticSearchDataProviderBase.qc.dox.h:28
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:61
The ElasticSearch document read API data provider.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:30
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:43
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
constructor(*hash< auto > options)
Creates the object from constructor options.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
const ResponseType
Response type.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:51
const ProviderInfo
Provider info.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:34
const RequestType
Request type.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:48
const QueryArgs
Query args.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:54
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
*string getDesc()
Returns the data provider description.
Document read API request data type.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:106
const Fields
Field descriptions.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:111
Document read API response.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:180
const Fields
Field descriptions.
Definition: ElasticSearchDocumentReadDataProvider.qc.dox.h:185
Boolean string type.
Definition: ElasticSearchDataProvider.qc.dox.h:141
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26