49 "desc":
"ElasticSearch index table data provider; provdes table-like access to an ElasticSearch index; "
50 "fields returned in searches are document properties, plus the special `_id` (document ID) and "
51 "`_score` (query match score) values, which are read-only.\n\n"
52 "Updating and deleting can be performed, but the 'where clause hash` must contain only a single "
53 "`_id` key to identify the document by its ID.\n\n"
54 "Searches are performed with `match`; for more flexible searching, use the index search API data "
55 "provider, `index/search`",
56 "type":
"ElasticSearchIndexTableDataProvider",
59 "supports_read":
True,
60 "supports_native_search":
True,
61 "supports_update":
True,
62 "supports_delete":
True,
63 "supports_create":
True,
65 "if_seq_no": <DataProviderOptionInfo>{
66 "type": AbstractDataProviderTypeMap.
"int",
67 "desc":
"Only perform the operation if the document has this sequence number",
69 "if_primary_term": <DataProviderOptionInfo>{
70 "type": AbstractDataProviderTypeMap.
"int",
71 "desc":
"Only perform the operation if the document has this primary term",
73 "op_type": <DataProviderOptionInfo>{
74 "type": AbstractDataProviderTypeMap.
"string",
75 "desc":
"Set to create to only index the document if it does not already exist (put if absent). If a "
76 "document with the specified `_id` already exists, the indexing operation will fail. Same as "
77 "using the `<index>/_create` endpoint. Valid values: `index`, `create`. If document id is "
78 "specified, it defaults to `index`. Otherwise, it defaults to `create`",
80 "pipeline": <DataProviderOptionInfo>{
81 "type": AbstractDataProviderTypeMap.
"string",
82 "desc":
"ID of the pipeline to use to preprocess incoming documents. If the index has a default "
83 "ingest pipeline specified, then setting the value to _none disables the default ingest pipeline "
84 "for this request. If a final pipeline is configured it will always run, regardless of the value "
87 "refresh": <DataProviderOptionInfo>{
88 "type": AbstractDataProviderTypeMap.
"string",
89 "desc":
"If `true`, Elasticsearch refreshes the affected shards to make this operation visible to "
90 "search, if `wait_for` then wait for a refresh to make this operation visible to search, if "
91 "`false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`",
93 "routing": <DataProviderOptionInfo>{
94 "type": AbstractDataProviderTypeMap.
"string",
95 "desc":
"Custom value used to route operations to a specific shard",
97 "timeout": <DataProviderOptionInfo>{
98 "type": AbstractDataProviderTypeMap.
"string",
99 "desc":
"Period to wait for a response (ex: `1m`). If no response is received before the "
100 "timeout expires, the request fails and returns an error",
102 "version": <DataProviderOptionInfo>{
103 "type": AbstractDataProviderTypeMap.
"int",
104 "desc":
"Explicit version number for concurrency control. The specified version must match the "
105 "current version of the document for the request to succeed",
107 "version_type": <DataProviderOptionInfo>{
108 "type": AbstractDataProviderTypeMap.
"string",
109 "desc":
"Specific version type: `external`, `external_gte`",
111 "wait_for_active_shards": <DataProviderOptionInfo>{
112 "type": AbstractDataProviderTypeMap.
"string",
113 "desc":
"The number of shard copies that must be active before proceeding with the operation. Set to "
114 "`all` or any positive integer up to the total number of shards in the index (number_of_replicas+1)",
116 "require_alias": <DataProviderOptionInfo>{
118 "desc":
"If `true`, the destination must be an index alias",
122 "if_seq_no": <DataProviderOptionInfo>{
123 "type": AbstractDataProviderTypeMap.
"int",
124 "desc":
"Only perform the operation if the document has this sequence number\n"
127 "if_primary_term": <DataProviderOptionInfo>{
128 "type": AbstractDataProviderTypeMap.
"int",
129 "desc":
"Only perform the operation if the document has this primary term\n"
132 "lang": <DataProviderOptionInfo>{
133 "type": AbstractDataProviderTypeMap.
"string",
134 "desc":
"The script language\n"
137 "operator": <DataProviderOptionInfo>{
138 "type": AbstractDataProviderTypeMap.
"string",
139 "desc":
"Boolean logic used to interpret text in the query value. Valid values are:\n"
140 "- `or` (Default): For example, a query value of `capital of Hungary` is interpreted as "
141 "`capital OR of OR Hungary`\n"
142 "- `and`: For example, a query value of `capital of Hungary` is interpreted as "
143 "`capital AND of AND Hungary`\n"
148 "desc":
"Or logic - any terms match (default)",
152 "desc":
"And logic - all terms must match",
156 "require_alias": <DataProviderOptionInfo>{
158 "desc":
"If `true`, the destination must be an index alias\n"
161 "refresh": <DataProviderOptionInfo>{
162 "type": AbstractDataProviderTypeMap.
"string",
163 "desc":
"If `true`, Elasticsearch refreshes the affected shards to make this operation visible to "
164 "search, if `wait_for` then wait for a refresh to make this operation visible to search, if "
165 "`false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`\n"
168 "retry_on_conflict": <DataProviderOptionInfo>{
169 "type": AbstractDataProviderTypeMap.
"int",
170 "desc":
"Specify how many times should the operation be retried when a conflict occurs\n"
173 "routing": <DataProviderOptionInfo>{
174 "type": AbstractDataProviderTypeMap.
"string",
175 "desc":
"Custom value used to route operations to a specific shard\n"
178 "_source": <DataProviderOptionInfo>{
179 "type": AbstractDataProviderTypeMap.
"string",
180 "desc":
"Set to `false` to disable source retrieval (default: `true`). You can also specify a "
181 "comma-separated list of the fields you want to retrieve\n"
184 "_source_excludes": <DataProviderOptionInfo>{
185 "type": AbstractDataProviderTypeMap.
"string",
186 "desc":
"Specify the source fields you want to exclude\n"
189 "_source_includes": <DataProviderOptionInfo>{
190 "type": AbstractDataProviderTypeMap.
"string",
191 "desc":
"Specify the source fields you want to exclude\n"
194 "timeout": <DataProviderOptionInfo>{
195 "type": AbstractDataProviderTypeMap.
"string",
196 "desc":
"Period to wait for a response (ex: `1m` = 1 minute). If no response is received before "
197 "the timeout expires, the request fails and returns an error",
199 "version": <DataProviderOptionInfo>{
200 "type": AbstractDataProviderTypeMap.
"string",
203 "wait_for_active_shards": <DataProviderOptionInfo>{
204 "type": AbstractDataProviderTypeMap.
"string",
205 "desc":
"The number of shard copies that must be active before proceeding with the operation. "
206 "Set to `all` or any positive integer up to the total number of shards in the index "
207 "(number_of_replicas+1)\n"
215 AbstractDataProvider::DataProviderSummaryInfoKeys
220 "binary": AbstractDataProviderTypeMap.
"base64binary",
222 "boolean": AbstractDataProviderTypeMap.
"boolean",
224 "keyword": AbstractDataProviderTypeMap.
"string",
225 "constant_keyword": AbstractDataProviderTypeMap.
"string",
226 "wildcard": AbstractDataProviderTypeMap.
"string",
228 "ip": AbstractDataProviderTypeMap.
"string",
229 "version": AbstractDataProviderTypeMap.
"string",
230 "mumur3": AbstractDataProviderTypeMap.
"string",
232 "text": AbstractDataProviderTypeMap.
"string",
233 "match_only_text": AbstractDataProviderTypeMap.
"string",
235 "byte": AbstractDataProviderTypeMap.
"int",
236 "short": AbstractDataProviderTypeMap.
"int",
237 "integer": AbstractDataProviderTypeMap.
"int",
238 "long": AbstractDataProviderTypeMap.
"int",
240 "unsigned_long": AbstractDataProviderTypeMap.
"number",
242 "date": AbstractDataProviderTypeMap.
"date",
244 "date_nanos": AbstractDataProviderTypeMap.
"date",
246 "double": AbstractDataProviderTypeMap.
"float",
247 "float": AbstractDataProviderTypeMap.
"float",
248 "half_float": AbstractDataProviderTypeMap.
"float",
249 "scaled_float": AbstractDataProviderTypeMap.
"float",
251 "object": AbstractDataProviderTypeMap.
"hash",
252 "flattened": AbstractDataProviderTypeMap.
"hash",
254 "nested": AbstractDataProviderTypeMap.
"list",
263 "_id":
new QoreDataField(
"_id",
"the document ID", AbstractDataProviderTypeMap.
"softstring"),
264 "_score":
new QoreDataField(
"_score",
"the score for the match (read-only)",
265 AbstractDataProviderTypeMap.
"float"),
345 static string getQueryOptions(
string uri, hash<auto> search_options, list<string> query_args);
349 string getDocUriPath(
string uri_str, *hash<auto> where_cond,
string action, *hash<auto> search_options, *list<string> query_args);
360 *hash<string, DataProvider::AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
The AWS REST client base data provider class.
Definition: ElasticSearchDataProviderBase.qc.dox.h:28
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:61
This class exposes ElasticSearch indices as record-based data providers.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:38
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:214
const ProviderInfo
Provider info.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:48
static string getQueryOptions(string uri, hash< auto > search_options, list< string > query_args)
Returns a URI path with query options.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DataProvider::AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
DataProvider::AbstractDataProviderType getTypeForProperty(string name, hash< auto > prop)
Returns a data type for a property.
const SearchQueryOptions
Search query options.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:258
constructor(RestClient::RestClient rest, string name, hash< auto > index)
Creates the object from a REST connection.
int updateRecordsImpl(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates a single document in the index.
string getName()
Returns the data provider name.
hash< auto > index
Index hash.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:45
hash< string, AbstractDataField > record_type
The record type for the object.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:262
string name
Current index name.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:42
getRecordInfoIntern()
Retrieves the record type.
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Writes the given record to the data provider.
*string getDesc()
Returns the data provider description.
string getDocUriPath(string uri_str, *hash< auto > where_cond, string action, *hash< auto > search_options, *list< string > query_args)
Makes sure that the where_cond is only the _id field.
const TypeMap
ElasticSearch property types to data types.
Definition: ElasticSearchIndexTableDataProvider.qc.dox.h:219
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26
const SoftBoolDataProviderStringType
Boolean data provider string type for query parameters.
Definition: ElasticSearchDataProvider.qc.dox.h:138