41 "desc":
"ElasticSearch index search API data provider",
42 "type":
"ElasticSearchIndexSearchDataProvider",
44 "supports_request":
True,
49 AbstractDataProvider::DataProviderSummaryInfoKeys
120 "desc":
"The name of the index to search",
122 "allow_no_indices": {
124 "desc":
"If `false` (default `true`), the request returns an error if any wildcard expression, index "
125 "alias, or `_all` value targets only missing or closed indices. This behavior applies even if "
126 "the request targets other open indices. For example, a request targeting `foo*,bar*` returns an "
127 "error if an index starts with `foo` but no index starts with `bar`",
129 "allow_partial_search_results": {
131 "desc":
"If `true`, returns partial results if there are shard request timeouts or shard failures. "
132 "If `false`, returns an error with no partial results.\n\n"
133 "To override the default for this field, set the `search.default_allow_partial_results` cluster "
137 "type": StringOrNothingType,
138 "desc":
"Analyzer to use for the query string.\n\n"
139 "This parameter can only be used when the `q` query string parameter is specified",
141 "analyze_wildcard": {
143 "desc":
"If `true` (default `false`), wildcard and prefix queries are analyzed.\n\n"
144 "This parameter can only be used when the `q` query string parameter is specified",
146 "batched_reduce_size": {
147 "type": IntOrNothingType,
148 "desc":
"The number of shard results (default `512`) that should be reduced at once on the "
149 "coordinating node. This value should be used as a protection mechanism to reduce the memory "
150 "overhead per search request if the potential number of shards in the request can be large",
152 "ccs_minimize_roundtrips": {
154 "desc":
"If `true` (the detaul), network round-trips between the coordinating node and the remote "
155 "clusters are minimized when executing cross-cluster search (CCS) requests",
157 "default_operator": {
158 "type": StringOrNothingType,
159 "desc":
"The default operator for query string query: `AND` or `OR`\n\n"
160 "This parameter can only be used when the `q` query string parameter is specified",
163 "type": StringOrNothingType,
164 "desc":
"Field to use as default where no field prefix is given in the query string.\n\n"
165 "This parameter can only be used when the `q` query string parameter is specified",
167 "docvalue_fields_query": {
168 "type": StringOrNothingType,
169 "desc":
"A comma-separated list of fields to return as the docvalue representation of a field for "
172 "expand_wildcards": {
173 "type": StringOrNothingType,
174 "desc":
"Type of index that wildcard patterns can match. If the request can target data streams, "
175 "this argument determines whether wildcard expressions match hidden data streams. Supports "
176 "comma-separated values, such as open,hidden. Valid values are:\n"
177 "- `all`: Match any data stream or index, including hidden ones\n"
178 "- `open`: (default) Match open, non-hidden indices. Also matches any non-hidden data stream\n"
179 "- `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data "
180 "streams cannot be closed\n"
181 "- `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, "
182 "`closed`, or both\n"
183 "- `none`: Wildcard patterns are not accepted",
187 "desc":
"If `true` (default `false`), returns detailed information about score computation as part "
191 "type": IntOrNothingType,
192 "desc":
"Starting document offset. Needs to be non-negative and defaults to 0.\n\n"
193 "By default, you cannot page through more than 10,000 hits using the from and size parameters. "
194 "To page through more hits, use the `search_after` parameter",
196 "ignore_throttled": {
198 "desc":
"If `true` (the default), concrete, expanded or aliased indices will be ignored when frozen",
200 "ignore_unavailable": {
202 "desc":
"If `false` (the default), the request returns an error if it targets a missing or closed "
207 "desc":
"If `true` (default `false`), format-based query failures (such as providing text to a "
208 "numeric field) in the query string will be ignored.\n\n"
209 "This parameter can only be used when the `q` query string parameter is specified",
211 "max_concurrent_shard_requests": {
212 "type": IntOrNothingType,
213 "desc":
"Defines the number of concurrent shard requests per node this search executes concurrently "
214 "(default `5`). This value should be used to limit the impact of the search on the cluster in "
215 "order to limit the number of concurrent shard requests",
217 "pre_filter_shard_size": {
218 "type": IntOrNothingType,
219 "desc":
"Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based "
220 "on query rewriting if the number of shards the search request expands to exceeds the threshold. "
221 "This filter roundtrip can limit the number of shards significantly if for instance a shard can "
222 "not match any documents based on its rewrite method ie. if date filters are mandatory to match "
223 "but the shard bounds and the query are disjoint. When unspecified, the pre-filter phase is "
224 "executed if any of these conditions is met:\n"
225 "- The request targets more than 128 shards\n"
226 "- The request targets one or more read-only index\n"
227 "- The primary sort of the query targets an indexed field",
230 "type": StringOrNothingType,
231 "desc":
"Nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes "
232 "and shards using adaptive replica selection, accounting for allocation awareness.\n\n"
233 "Valid values for preference:\n"
234 "- `_only_local`: Run the search only on shards on the local node\n"
235 "- `_local`: If possible, run the search on shards on the local node. If not, select shards "
236 "using the default method\n"
237 "- `_only_nodes:<node-id>,<node-id>`: Run the search on only the specified nodes IDs. If "
238 "suitable shards exist on more than one selected node, use shards on those nodes using the "
239 "default method. If none of the specified nodes are available, select shards from any "
240 "available node using the default method\n"
241 "- `_prefer_nodes:<node-id>,<node-id>`: If possible, run the search on the specified nodes IDs. "
242 "If not, select shards using the default method.\n"
243 "- `_shards:<shard>,<shard>`: Run the search only on the specified shards. You can combine this "
244 "value with other preference values. However, the `_shards` value must come first. For "
245 "example: `_shards:2,3|_local`\n"
246 "- `<custom-string>`: Any string that does not start with `_`. If the cluster state and selected "
247 "shards do not change, searches using the same `<custom-string>` value are routed to the "
248 "same shards in the same order",
251 "type": StringOrNothingType,
252 "desc":
"Query in the Lucene query string syntax.\n\n"
253 "You can use the `q` parameter to run a query parameter search. Query parameter searches do not "
254 "support the full Elasticsearch Query DSL but are handy for testing.\n\n"
255 "The `q` parameter overrides the query parameter in the request body",
259 "desc":
"If `true`, the caching of search results is enabled for requests where size is `0`. "
260 "Defaults to index level settings",
262 "rest_total_hits_as_int": {
264 "desc":
"Indicates whether `hits.total` should be rendered as an integer or an object in the rest "
265 "search response (default `false`)",
268 "type": StringOrNothingType,
269 "desc":
"Value used to route indexing and search operations to a specific shard",
272 "type": StringOrNothingType,
273 "desc":
"Period to retain the search context for scrolling.\n\n"
274 "By default, this value cannot exceed `1d` (24 hours). You can change this limit using the "
275 "`search.max_keep_alive` cluster-level setting",
278 "type": StringOrNothingType,
279 "desc":
"How distributed term frequencies are calculated for relevance scoring.\n\n"
280 "Valid values for search_type:\n"
281 "- `query_then_fetch`: (Default) Distributed term frequencies are calculated locally for each "
282 "shard running the search. We recommend this option for faster searches with potentially "
283 "less accurate scoring\n"
284 "- `dfs_query_then_fetch`: Distributed term frequencies are calculated globally, using "
285 "information gathered from all shards running the search. While this option increases the "
286 "accuracy of scoring, it adds a round-trip to each shard, which can result in slower "
289 "seq_no_primary_term_query": {
291 "desc":
"If `true`, returns sequence number and primary term of the last modification of each hit",
294 "type": IntOrNothingType,
295 "desc":
"Defines the number of hits to return.\n\n"
296 "By default, you cannot page through more than 10,000 hits using the `from` and `size` "
297 "parameters. To page through more hits, use the `search_after` parameter",
300 "type": StringOrNothingType,
301 "desc":
"A comma-separated list of `<field>:<direction>` pairs",
304 "type": StringOrNothingType,
305 "desc":
"Indicates which source fields are returned for matching documents. These fields are "
306 "returned in the `hits._source` property of the search response. Defaults to `true`.\n\n"
307 "Valid values for `_source`:\n"
308 "- `true`: The entire document source is returned\n"
309 "- `false`: The document source is not returned\n"
310 "- `<string>`: Comma-separated list of source fields to return. Wildcard (*) patterns are "
313 "_source_excludes": {
314 "type": StringOrNothingType,
315 "desc":
"A comma-separated list of source fields to exclude from the response.\n\n"
316 "You can also use this parameter to exclude fields from the subset specified in "
317 "`_source_includes` query parameter.\n\n"
318 "If the `_source` parameter is `false`, this parameter is ignored",
320 "_source_includes": {
321 "type": StringOrNothingType,
322 "desc":
"A comma-separated list of source fields to include in the response.\n\n"
323 "If this parameter is specified, only these source fields are returned. You can exclude fields "
324 "from this subset using the `_source_excludes` query parameter.\n\n"
325 "If the `_source` parameter is `false`, this parameter is ignored",
328 "type": StringOrNothingType,
329 "desc":
"Specific tag of the request for logging and statistical purposes",
331 "stored_fields_query": {
332 "type": StringOrNothingType,
333 "desc":
"A comma-separated list of stored fields to return as part of a hit. If no fields are "
334 "specified, no stored fields are included in the response.\n\n"
335 "If this field is specified, the `_source` parameter defaults to `false`. You can pass "
336 "`_source=true` to return both source fields and stored fields in the search response",
339 "type": StringOrNothingType,
340 "desc":
"Specifies which field to use for suggestions",
343 "type": StringOrNothingType,
344 "desc":
"Specifies the suggest mode. Available options:\n"
348 "This parameter can only be used when the `suggest_field` and `suggest_text` query string "
349 "parameters are specified",
352 "type": IntOrNothingType,
353 "desc":
"Number of suggestions to return.\n\n"
354 "This parameter can only be used when the `suggest_field` and `suggest_text` query string "
355 "parameters are specified",
358 "type": StringOrNothingType,
359 "desc":
"The source text for which the suggestions should be returned.\n\n"
360 "This parameter can only be used when the `suggest_field` query string parameter is specified",
362 "terminate_after_query": {
363 "type": IntOrNothingType,
364 "desc":
"Maximum number of documents to collect for each shard. If a query reaches this limit, "
365 "Elasticsearch terminates the query early. Elasticsearch collects documents before sorting.\n\n"
366 "Use with caution. Elasticsearch applies this parameter to each shard handling the request. When "
367 "possible, let Elasticsearch perform early termination automatically. Avoid specifying this "
368 "parameter for requests that target data streams with backing indices across multiple data "
370 "Defaults to `0`, which does not terminate query execution early",
373 "type": StringOrNothingType,
374 "desc":
"Specifies the period of time to wait for a response from each shard. If no response is "
375 "received before the timeout expires, the request fails and returns an error. Defaults to no "
380 "desc":
"If `true` (default `false`), calculate and return document scores, even if the scores are "
381 "not used for sorting",
383 "track_total_hits": {
384 "type": StringOrNothingType,
385 "desc":
"Number of hits matching the query to count accurately (default `\"10000\"`).\n\n"
386 "If `true`, the exact number of hits is returned at the cost of some performance. If `false`, "
387 "the response does not include the total number of hits matching the query",
391 "desc":
"If `true` (the default), aggregation and suggester names are be prefixed by their "
392 "respective types in the response",
396 "desc":
"If `true`, returns document version as part of a hit",
401 "type": SoftAutoListOrNothingType,
402 "desc":
"Array of field patterns. The request returns values for field names matching these patterns "
403 "in the `hits.fields` property of the response.\n\n"
404 "You can specify items in the array as a string or object.\n\n"
405 "Properties of docvalue_fields objects:\n"
406 "- `field`: (Required, string) Wildcard pattern. The request returns doc values for field names "
407 "matching this pattern.\n"
408 "- `format`: (Optional, string) Format in which the doc values are returned.\n\n"
409 "For date fields, you can specify a date date format. For numeric fields fields, you can specify "
410 "a DecimalFormat pattern.\n\n"
411 "For other field data types, this parameter is not supported",
414 "type": SoftAutoListOrNothingType,
415 "desc":
"Array of field patterns. The request returns values for field names matching these patterns "
416 "in the `hits.fields` property of the response.\n\n"
417 "You can specify items in the array as a string or object.\n\n"
418 "Properties of fields objects:\n"
419 "- `field`: (Required, string) Field to return. Supports wildcards (*)\n"
420 "- `format`: (Optional, string) Format for date and geospatial fields. Other field data types do "
421 "not support this parameter.\n\n"
422 " `date` and `date_nanos` fields accept a date format.\n\n"
423 " `geo_point` and `geo_shape` fields accept:\n"
424 " - `geojson (default)`: GeoJSON\n"
425 " - `wkt`: Well Known Text\n"
426 " - `mvt(<spec>)`: Binary Mapbox vector tile. The API returns the tile as a base64-encoded "
427 " string. `<spec>` has the format `<zoom>/<x>/<y>` with two optional suffixes: "
428 " `@<extent>` and/or `:<buffer>`. For example, `2/0/1` or `2/0/1@4096:5`.\n\n"
430 " - `<zoom>`: (Required, integer) Zoom level for the tile. Accepts `0-29`\n"
431 " - `<x>`: (Required, integer) X coordinate for the tile\n"
432 " - `<y>`: (Required, integer) Y coordinate for the tile\n"
433 " - `<extent>`: (Optional, integer) Size, in pixels, of a side of the tile. Vector tiles are "
434 " square with equal sides. Defaults to `4096`\n"
435 " - `<buffer>`: (Optional, integer) Size, in pixels, of a clipping buffer outside the tile. "
436 " This allows renderers to avoid outline artifacts from geometries that extend past the "
437 " extent of the tile. Defaults to `5`",
440 "type": StringOrNothingType,
441 "desc":
"A comma-separated list of stored fields to return as part of a hit. If no fields are "
442 "specified, no stored fields are included in the response.\n\n"
443 "If this option is specified, the `_source` parameter defaults to `false`. You can pass "
444 "`_source: true` to return both source fields and stored fields in the search response",
447 "type": BoolOrNothingType,
448 "desc":
"If `true` (default `false`), returns detailed information about score computation as part "
452 "type": IntOrNothingType,
453 "desc":
"Starting document offset (default `0`). Needs to be non-negative and defaults to `0`.\n\n"
454 "By default, you cannot page through more than 10,000 hits using the from and size parameters. "
455 "To page through more hits, use the `search_after` parameter",
458 "type": SoftAutoListOrNothingType,
459 "desc":
"Boosts the `_score` of documents from specified indices.\n\n"
460 "Properties of `indices_boost` objects:\n"
461 "- `<index>: <boost-value>`: (Required, float)\n"
462 " - `<index>` is the name of the index or index alias. Wildcard (*) expressions are supported\n"
463 " - `<boost-value>` is the factor by which scores are multiplied. A boost value greater than "
464 " `1.0` increases the score. A boost value between `0` and `1.0` decreases the score",
468 "desc":
"Defines the kNN query to run.\n\n"
469 "Properties of `knn` object:\n"
470 "- `field`: (Required, string) The name of the vector field to search against. Must be a "
471 "`dense_vector` field with indexing enabled\n"
472 "- `filter`: (Optional, Query DSL object) Query to filter the documents that can match. The kNN "
473 "search will return the top k documents that also match this filter. The value can be a "
474 "single query or a list of queries. If filter is not provided, all documents are allowed to "
476 "- `k`: (Required, integer) Number of nearest neighbors to return as top hits. This value must "
477 "be less than `num_candidates`\n"
478 "- `num_candidates`: (Required, integer) The number of nearest neighbor candidates to consider "
479 "per shard. Cannot exceed 10,000. Elasticsearch collects `num_candidates` results from each "
480 "shard, then merges them to find the top k results. Increasing `num_candidates` tends to "
481 "improve the accuracy of the final k results\n"
482 "- `query_vector`: (Optional, array of floats) Query vector. Must have the same number of "
483 "dimensions as the vector field you are searching against\n"
484 "- `query_vector_builder`: (Optional, object) A configuration object indicating how to build a "
485 "`query_vector` before executing the request. You must provide a `query_vector_builder` or "
486 "`query_vector`, but not both\n"
487 "- `similarity`: (Optional, float) The minimum similarity required for a document to be "
488 "considered a match. The similarity value calculated relates to the raw similarity used. Not "
489 "the document score. The matched documents are then scored according to similarity and the "
490 "provided boost is applied\n\n"
491 " The similarity parameter is the direct vector similarity calculation.\n\n"
492 " - `l2_norm`: also known as Euclidean, will include documents where the vector is within the "
493 " dims dimensional hypersphere with radius similarity with origin at query_vector\n"
494 " - `cosine` & `dot_product`: Only return vectors where the cosine similarity or dot-product "
495 " are at least the provided similarity",
498 "type": FloatOrNothingType,
499 "desc":
"Minimum `_score` for matching documents. Documents with a lower `_score` are not included "
500 "in the search results",
503 "type": AutoHashOrNothingType,
504 "desc":
"Limits the search to a point in time (PIT). If you provide a `pit`, you cannot specify a "
505 "`<target>` in the request path.\n\n"
506 "Properties of `pit`:\n"
507 "- `id`: (Required*, string) ID for the PIT to search. If you provide a `pit` object, this "
508 " parameter is required\n"
509 "- `keep_alive`: (Optional, time value) Period of time used to extend the life of the PIT",
512 "type": AutoHashOrNothingType,
513 "desc":
"Specifies the search using the Query DSL",
516 "type": AutoHashOrNothingType,
517 "desc":
"Defines a method for combining and ranking result sets from either:\n"
518 "- 1 query and 1 or more kNN searches\n"
519 "- 2 or more kNN searches\n\n"
521 "- `rrf`: (Optional, object) Sets the ranking method to reciprocal rank fusion (RRF)",
523 "runtime_mappings": {
524 "type": AutoHashOrNothingType,
525 "desc":
"Defines one or more runtime fields in the search request. These fields take precedence over "
526 "mapped fields with the same name.\n\n"
527 "Properties of `runtime_mappings` objects:\n"
528 "- `<field-name>`: (Required, object) Configuration for the runtime field. The key is the field "
530 " Properties of <field-name>:\n"
531 " - `type`: (Required, string) Field type, which can be any of the following:\n"
541 " - `script`: (Optional, string) Painless script executed at query time. The script has access "
542 "to the entire context of a document, including the original `_source` and any mapped fields "
543 "plus their values.\n\n"
544 " This script must include emit to return calculated values. For example:\n"
545 " `\"script\": \"emit(doc['@timestamp'].value.dayOfWeekEnum.toString())\"`",
547 "seq_no_primary_term": {
549 "desc":
"If `true`, returns sequence number and primary term of the last modification of each hit",
552 "type": IntOrNothingType,
553 "desc":
"The number of hits to return. Needs to be non-negative and defaults to `10`.\n\n"
554 "By default, you cannot page through more than 10,000 hits using the `from` and `size` "
555 "parameters. To page through more hits, use the `search_after` parameter",
559 "desc":
"Indicates which source fields are returned for matching documents. These fields are "
560 "returned in the `hits._source` property of the search response.\n\n"
561 "Valid values for `_source`:\n"
562 "- `true`: (Boolean - the default) The entire document source is returned\n"
563 "- `false`: (Boolean) The document source is not returned\n"
564 "- `<wildcard_pattern>`: (string or array of strings) Wildcard (*) pattern or array of patterns "
565 "containing source fields to return\n"
566 "- `<object>`: (object) Object containing a list of source fields to include or exclude\n"
567 " Properties for `<object>`:\n"
568 " - `excludes`: (string or array of strings) Wildcard (*) pattern or array of patterns "
569 "containing source fields to exclude from the response\n\n"
570 " You can also use this property to exclude fields from the subset specified in the "
571 "`includes` property\n"
572 " - `includes`: (string or array of strings) Wildcard (*) pattern or array of patterns "
573 "containing source fields to return\n\n"
574 " If this property is specified, only these source fields are returned. You can exclude "
575 "fields from this subset using the `excludes` property",
578 "type":
new Type(
"*softlist<string>"),
579 "desc":
"Stats groups to associate with the search. Each group maintains a statistics aggregation "
580 "for its associated searches",
583 "type": IntOrNothingType,
584 "desc":
"Maximum number of documents to collect for each shard. If a query reaches "
585 "this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before "
587 "Use with caution. Elasticsearch applies this parameter to each shard handling the request. When "
588 "possible, let Elasticsearch perform early termination automatically. Avoid specifying this "
589 "parameter for requests that target data streams with backing indices across multiple data "
591 "Defaults to `0`, which does not terminate query execution early",
594 "type": StringOrNothingType,
595 "desc":
"Specifies the period of time to wait for a response from each shard. If no response is "
596 "received before the timeout expires, the request fails and returns an error. Defaults to no "
601 "desc":
"If `true` (default `false`), returns document version as part of a hit",
The acknowledged response type.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:28
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:64
The ElasticSearch index search API data provider.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:32
*string getDesc()
Returns the data provider description.
const ResponseType
Response type.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:56
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
constructor(*hash< auto > options)
Creates the object from constructor options.
string getName()
Returns the data provider name.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:48
const ProviderInfo
Provider info.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:39
RestClient::RestClient rest
REST client connection.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:36
const QueryArgs
Query args.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:59
const RequestType
Request type.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:53
ElasticSearch index search API request.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:111
const Fields
Field descriptions.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:116
constructor()
Creates the object.
ElasticSearch index search API response.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:613
constructor()
Creates the object.
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26
const SoftBoolStringType
Boolean string type for query parameters.
Definition: ElasticSearchDataProvider.qc.dox.h:134