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