$darkmode
Qore ElasticSearchDataProvider Module Reference 1.0
ElasticSearchIndexReadDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
28
33class ElasticSearchIndexReadDataProvider : public AbstractDataProvider {
34
35public:
38
40 const ProviderInfo = <DataProviderInfo>{
41 "name": "read",
42 "desc": "ElasticSearch index read API data provider",
43 "type": "ElasticSearchIndexReadDataProvider",
45 "supports_request": True,
46 };
47
49 const ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
50 AbstractDataProvider::DataProviderSummaryInfoKeys
51 });
52
55
58
60 const QueryArgs = ...;
61
62
64 constructor(*hash<auto> options);
65
66
69
70
72 string getName();
73
74
76 *string getDesc();
77
78
80
85protected:
86 auto doRequestImpl(auto req, *hash<auto> request_options);
87public:
88
89
91
93protected:
95public:
96
97
99
101protected:
103public:
104
105
107 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
108
109};
110
113
114public:
116 const Fields = {
117 // query parameters
118 "index": {
119 "type": StringType,
120 "desc": "The name of the index to read",
121 },
122 "allow_no_indices": {
123 "type": SoftBoolStringType,
124 "desc": "f `false`, the request returns an error if any wildcard expression, index alias, or `_all` "
125 "value targets only missing or closed indices. This behavior applies even if the request targets "
126 "other open indices. For example, a request targeting `foo*,bar*` returns an error if an index "
127 "starts with `foo` but no index starts with `bar`",
128 },
129 "expand_wildcards": {
130 "type": StringOrNothingType,
131 "desc": "Type of index that wildcard patterns can match. If the request can target data streams, "
132 "this argument determines whether wildcard expressions match hidden data streams. Supports "
133 "comma-separated values, such as open,hidden. Valid values are:\n"
134 "- `all`: Match any data stream or index, including hidden ones\n"
135 "- `open`: (default) Match open, non-hidden indices. Also matches any non-hidden data stream.\n"
136 "- `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data "
137 "streams cannot be closed\n"
138 "- `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, "
139 "`closed`, or both\n"
140 "- `none`: Wildcard patterns are not accepted",
141 },
142 "features": {
143 "type": StringOrNothingType,
144 "desc": "Return information about specific index features. Supports comma-separated values. Valid "
145 "values are: `aliases`, `mappings`, and `settings`.",
146 },
147 "flat_settings": {
148 "type": SoftBoolStringType,
149 "desc": "If `true`, returns settings in flat format",
150 },
151 "include_defaults": {
152 "type": SoftBoolStringType,
153 "desc": "If `true`, return all default settings in the response",
154 },
155 "ignore_unavailable": {
156 "type": SoftBoolStringType,
157 "desc": "If `false`, the request returns an error if it targets a missing or closed index",
158 },
159 "master_timeout": {
160 "type": StringOrNothingType,
161 "desc": "Period to wait for a connection to the master node. If no response is received before the "
162 "timeout expires, the request fails and returns an error",
163 },
164 };
165
168
169};
170
172class ElasticSearchIndexReadResponseDataType : public HashDataType {
173
174public:
177
178};
179};
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:64
The ElasticSearch index read API data provider.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:33
*string getDesc()
Returns the data provider description.
constructor(*hash< auto > options)
Creates the object from constructor options.
const QueryArgs
Query args.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:60
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:49
const RequestType
Request type.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:54
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
string getName()
Returns the data provider name.
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
RestClient::RestClient rest
REST client connection.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:37
const ResponseType
Response type.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:57
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
const ProviderInfo
Provider info.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:40
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
ElasticSearch index read API request.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:112
const Fields
Field descriptions.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:116
ElasticSearch index read API response.
Definition: ElasticSearchIndexReadDataProvider.qc.dox.h:172
const True
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26
const SoftBoolStringType
Boolean string type for query parameters.
Definition: ElasticSearchDataProvider.qc.dox.h:134