38 "desc":
"ElasticSearch index search API data provider",
39 "type":
"ElasticSearchIndexSearchDataProvider",
41 "supports_request": True,
46 AbstractDataProvider::DataProviderSummaryInfoKeys
117 "desc":
"The name of the index to search",
119 "allow_no_indices": {
121 "desc":
"If `false` (default `true`), the request returns an error if any wildcard expression, index "
122 "alias, or `_all` value targets only missing or closed indices. This behavior applies even if "
123 "the request targets other open indices. For example, a request targeting `foo*,bar*` returns an "
124 "error if an index starts with `foo` but no index starts with `bar`",
126 "allow_partial_search_results": {
128 "desc":
"If `true`, returns partial results if there are shard request timeouts or shard failures. "
129 "If `false`, returns an error with no partial results.\n\n"
130 "To override the default for this field, set the `search.default_allow_partial_results` cluster "
134 "type": StringOrNothingType,
135 "desc":
"Analyzer to use for the query string.\n\n"
136 "This parameter can only be used when the `q` query string parameter is specified",
138 "analyze_wildcard": {
140 "desc":
"If `true` (default `false`), wildcard and prefix queries are analyzed.\n\n"
141 "This parameter can only be used when the `q` query string parameter is specified",
143 "batched_reduce_size": {
144 "type": IntOrNothingType,
145 "desc":
"The number of shard results (default `512`) that should be reduced at once on the "
146 "coordinating node. This value should be used as a protection mechanism to reduce the memory "
147 "overhead per search request if the potential number of shards in the request can be large",
149 "ccs_minimize_roundtrips": {
151 "desc":
"If `true` (the detaul), network round-trips between the coordinating node and the remote "
152 "clusters are minimized when executing cross-cluster search (CCS) requests",
154 "default_operator": {
155 "type": StringOrNothingType,
156 "desc":
"The default operator for query string query: `AND` or `OR`\n\n"
157 "This parameter can only be used when the `q` query string parameter is specified",
160 "type": StringOrNothingType,
161 "desc":
"Field to use as default where no field prefix is given in the query string.\n\n"
162 "This parameter can only be used when the `q` query string parameter is specified",
164 "docvalue_fields_query": {
165 "type": StringOrNothingType,
166 "desc":
"A comma-separated list of fields to return as the docvalue representation of a field for "
169 "expand_wildcards": {
170 "type": StringOrNothingType,
171 "desc":
"Type of index that wildcard patterns can match. If the request can target data streams, "
172 "this argument determines whether wildcard expressions match hidden data streams. Supports "
173 "comma-separated values, such as open,hidden. Valid values are:\n"
174 "- `all`: Match any data stream or index, including hidden ones\n"
175 "- `open`: (default) Match open, non-hidden indices. Also matches any non-hidden data stream\n"
176 "- `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data "
177 "streams cannot be closed\n"
178 "- `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, "
179 "`closed`, or both\n"
180 "- `none`: Wildcard patterns are not accepted",
184 "desc":
"If `true` (default `false`), returns detailed information about score computation as part "
188 "type": IntOrNothingType,
189 "desc":
"Starting document offset. Needs to be non-negative and defaults to 0.\n\n"
190 "By default, you cannot page through more than 10,000 hits using the from and size parameters. "
191 "To page through more hits, use the `search_after` parameter",
193 "ignore_throttled": {
195 "desc":
"If `true` (the default), concrete, expanded or aliased indices will be ignored when frozen",
197 "ignore_unavailable": {
199 "desc":
"If `false` (the default), the request returns an error if it targets a missing or closed "
204 "desc":
"If `true` (default `false`), format-based query failures (such as providing text to a "
205 "numeric field) in the query string will be ignored.\n\n"
206 "This parameter can only be used when the `q` query string parameter is specified",
208 "max_concurrent_shard_requests": {
209 "type": IntOrNothingType,
210 "desc":
"Defines the number of concurrent shard requests per node this search executes concurrently "
211 "(default `5`). This value should be used to limit the impact of the search on the cluster in "
212 "order to limit the number of concurrent shard requests",
214 "pre_filter_shard_size": {
215 "type": IntOrNothingType,
216 "desc":
"Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based "
217 "on query rewriting if the number of shards the search request expands to exceeds the threshold. "
218 "This filter roundtrip can limit the number of shards significantly if for instance a shard can "
219 "not match any documents based on its rewrite method ie. if date filters are mandatory to match "
220 "but the shard bounds and the query are disjoint. When unspecified, the pre-filter phase is "
221 "executed if any of these conditions is met:\n"
222 "- The request targets more than 128 shards\n"
223 "- The request targets one or more read-only index\n"
224 "- The primary sort of the query targets an indexed field",
227 "type": StringOrNothingType,
228 "desc":
"Nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes "
229 "and shards using adaptive replica selection, accounting for allocation awareness.\n\n"
230 "Valid values for preference:\n"
231 "- `_only_local`: Run the search only on shards on the local node\n"
232 "- `_local`: If possible, run the search on shards on the local node. If not, select shards "
233 "using the default method\n"
234 "- `_only_nodes:<node-id>,<node-id>`: Run the search on only the specified nodes IDs. If "
235 "suitable shards exist on more than one selected node, use shards on those nodes using the "
236 "default method. If none of the specified nodes are available, select shards from any "
237 "available node using the default method\n"
238 "- `_prefer_nodes:<node-id>,<node-id>`: If possible, run the search on the specified nodes IDs. "
239 "If not, select shards using the default method.\n"
240 "- `_shards:<shard>,<shard>`: Run the search only on the specified shards. You can combine this "
241 "value with other preference values. However, the `_shards` value must come first. For "
242 "example: `_shards:2,3|_local`\n"
243 "- `<custom-string>`: Any string that does not start with `_`. If the cluster state and selected "
244 "shards do not change, searches using the same `<custom-string>` value are routed to the "
245 "same shards in the same order",
248 "type": StringOrNothingType,
249 "desc":
"Query in the Lucene query string syntax.\n\n"
250 "You can use the `q` parameter to run a query parameter search. Query parameter searches do not "
251 "support the full Elasticsearch Query DSL but are handy for testing.\n\n"
252 "The `q` parameter overrides the query parameter in the request body",
256 "desc":
"If `true`, the caching of search results is enabled for requests where size is `0`. "
257 "Defaults to index level settings",
259 "rest_total_hits_as_int": {
261 "desc":
"Indicates whether `hits.total` should be rendered as an integer or an object in the rest "
262 "search response (default `false`)",
265 "type": StringOrNothingType,
266 "desc":
"Value used to route indexing and search operations to a specific shard",
269 "type": StringOrNothingType,
270 "desc":
"Period to retain the search context for scrolling.\n\n"
271 "By default, this value cannot exceed `1d` (24 hours). You can change this limit using the "
272 "`search.max_keep_alive` cluster-level setting",
275 "type": StringOrNothingType,
276 "desc":
"How distributed term frequencies are calculated for relevance scoring.\n\n"
277 "Valid values for search_type:\n"
278 "- `query_then_fetch`: (Default) Distributed term frequencies are calculated locally for each "
279 "shard running the search. We recommend this option for faster searches with potentially "
280 "less accurate scoring\n"
281 "- `dfs_query_then_fetch`: Distributed term frequencies are calculated globally, using "
282 "information gathered from all shards running the search. While this option increases the "
283 "accuracy of scoring, it adds a round-trip to each shard, which can result in slower "
286 "seq_no_primary_term_query": {
288 "desc":
"If `true`, returns sequence number and primary term of the last modification of each hit",
291 "type": IntOrNothingType,
292 "desc":
"Defines the number of hits to return.\n\n"
293 "By default, you cannot page through more than 10,000 hits using the `from` and `size` "
294 "parameters. To page through more hits, use the `search_after` parameter",
297 "type": StringOrNothingType,
298 "desc":
"A comma-separated list of `<field>:<direction>` pairs",
301 "type": StringOrNothingType,
302 "desc":
"Indicates which source fields are returned for matching documents. These fields are "
303 "returned in the `hits._source` property of the search response. Defaults to `true`.\n\n"
304 "Valid values for `_source`:\n"
305 "- `true`: The entire document source is returned\n"
306 "- `false`: The document source is not returned\n"
307 "- `<string>`: Comma-separated list of source fields to return. Wildcard (*) patterns are "
310 "_source_excludes": {
311 "type": StringOrNothingType,
312 "desc":
"A comma-separated list of source fields to exclude from the response.\n\n"
313 "You can also use this parameter to exclude fields from the subset specified in "
314 "`_source_includes` query parameter.\n\n"
315 "If the `_source` parameter is `false`, this parameter is ignored",
317 "_source_includes": {
318 "type": StringOrNothingType,
319 "desc":
"A comma-separated list of source fields to include in the response.\n\n"
320 "If this parameter is specified, only these source fields are returned. You can exclude fields "
321 "from this subset using the `_source_excludes` query parameter.\n\n"
322 "If the `_source` parameter is `false`, this parameter is ignored",
325 "type": StringOrNothingType,
326 "desc":
"Specific tag of the request for logging and statistical purposes",
328 "stored_fields_query": {
329 "type": StringOrNothingType,
330 "desc":
"A comma-separated list of stored fields to return as part of a hit. If no fields are "
331 "specified, no stored fields are included in the response.\n\n"
332 "If this field is specified, the `_source` parameter defaults to `false`. You can pass "
333 "`_source=true` to return both source fields and stored fields in the search response",
336 "type": StringOrNothingType,
337 "desc":
"Specifies which field to use for suggestions",
340 "type": StringOrNothingType,
341 "desc":
"Specifies the suggest mode. Available options:\n"
345 "This parameter can only be used when the `suggest_field` and `suggest_text` query string "
346 "parameters are specified",
349 "type": IntOrNothingType,
350 "desc":
"Number of suggestions to return.\n\n"
351 "This parameter can only be used when the `suggest_field` and `suggest_text` query string "
352 "parameters are specified",
355 "type": StringOrNothingType,
356 "desc":
"The source text for which the suggestions should be returned.\n\n"
357 "This parameter can only be used when the `suggest_field` query string parameter is specified",
359 "terminate_after_query": {
360 "type": IntOrNothingType,
361 "desc":
"Maximum number of documents to collect for each shard. If a query reaches this limit, "
362 "Elasticsearch terminates the query early. Elasticsearch collects documents before sorting.\n\n"
363 "Use with caution. Elasticsearch applies this parameter to each shard handling the request. When "
364 "possible, let Elasticsearch perform early termination automatically. Avoid specifying this "
365 "parameter for requests that target data streams with backing indices across multiple data "
367 "Defaults to `0`, which does not terminate query execution early",
370 "type": StringOrNothingType,
371 "desc":
"Specifies the period of time to wait for a response from each shard. If no response is "
372 "received before the timeout expires, the request fails and returns an error. Defaults to no "
377 "desc":
"If `true` (default `false`), calculate and return document scores, even if the scores are "
378 "not used for sorting",
380 "track_total_hits": {
381 "type": StringOrNothingType,
382 "desc":
"Number of hits matching the query to count accurately (default `\"10000\"`).\n\n"
383 "If `true`, the exact number of hits is returned at the cost of some performance. If `false`, "
384 "the response does not include the total number of hits matching the query",
388 "desc":
"If `true` (the default), aggregation and suggester names are be prefixed by their "
389 "respective types in the response",
393 "desc":
"If `true`, returns document version as part of a hit",
398 "type": SoftAutoListOrNothingType,
399 "desc":
"Array of field patterns. The request returns values for field names matching these patterns "
400 "in the `hits.fields` property of the response.\n\n"
401 "You can specify items in the array as a string or object.\n\n"
402 "Properties of docvalue_fields objects:\n"
403 "- `field`: (Required, string) Wildcard pattern. The request returns doc values for field names "
404 "matching this pattern.\n"
405 "- `format`: (Optional, string) Format in which the doc values are returned.\n\n"
406 "For date fields, you can specify a date date format. For numeric fields fields, you can specify "
407 "a DecimalFormat pattern.\n\n"
408 "For other field data types, this parameter is not supported",
411 "type": SoftAutoListOrNothingType,
412 "desc":
"Array of field patterns. The request returns values for field names matching these patterns "
413 "in the `hits.fields` property of the response.\n\n"
414 "You can specify items in the array as a string or object.\n\n"
415 "Properties of fields objects:\n"
416 "- `field`: (Required, string) Field to return. Supports wildcards (*)\n"
417 "- `format`: (Optional, string) Format for date and geospatial fields. Other field data types do "
418 "not support this parameter.\n\n"
419 " `date` and `date_nanos` fields accept a date format.\n\n"
420 " `geo_point` and `geo_shape` fields accept:\n"
421 " - `geojson (default)`: GeoJSON\n"
422 " - `wkt`: Well Known Text\n"
423 " - `mvt(<spec>)`: Binary Mapbox vector tile. The API returns the tile as a base64-encoded "
424 " string. `<spec>` has the format `<zoom>/<x>/<y>` with two optional suffixes: "
425 " `@<extent>` and/or `:<buffer>`. For example, `2/0/1` or `2/0/1@4096:5`.\n\n"
427 " - `<zoom>`: (Required, integer) Zoom level for the tile. Accepts `0-29`\n"
428 " - `<x>`: (Required, integer) X coordinate for the tile\n"
429 " - `<y>`: (Required, integer) Y coordinate for the tile\n"
430 " - `<extent>`: (Optional, integer) Size, in pixels, of a side of the tile. Vector tiles are "
431 " square with equal sides. Defaults to `4096`\n"
432 " - `<buffer>`: (Optional, integer) Size, in pixels, of a clipping buffer outside the tile. "
433 " This allows renderers to avoid outline artifacts from geometries that extend past the "
434 " extent of the tile. Defaults to `5`",
437 "type": StringOrNothingType,
438 "desc":
"A comma-separated list of stored fields to return as part of a hit. If no fields are "
439 "specified, no stored fields are included in the response.\n\n"
440 "If this option is specified, the `_source` parameter defaults to `false`. You can pass "
441 "`_source: true` to return both source fields and stored fields in the search response",
444 "type": BoolOrNothingType,
445 "desc":
"If `true` (default `false`), returns detailed information about score computation as part "
449 "type": IntOrNothingType,
450 "desc":
"Starting document offset (default `0`). Needs to be non-negative and defaults to `0`.\n\n"
451 "By default, you cannot page through more than 10,000 hits using the from and size parameters. "
452 "To page through more hits, use the `search_after` parameter",
455 "type": SoftAutoListOrNothingType,
456 "desc":
"Boosts the `_score` of documents from specified indices.\n\n"
457 "Properties of `indices_boost` objects:\n"
458 "- `<index>: <boost-value>`: (Required, float)\n"
459 " - `<index>` is the name of the index or index alias. Wildcard (*) expressions are supported\n"
460 " - `<boost-value>` is the factor by which scores are multiplied. A boost value greater than "
461 " `1.0` increases the score. A boost value between `0` and `1.0` decreases the score",
465 "desc":
"Defines the kNN query to run.\n\n"
466 "Properties of `knn` object:\n"
467 "- `field`: (Required, string) The name of the vector field to search against. Must be a "
468 "`dense_vector` field with indexing enabled\n"
469 "- `filter`: (Optional, Query DSL object) Query to filter the documents that can match. The kNN "
470 "search will return the top k documents that also match this filter. The value can be a "
471 "single query or a list of queries. If filter is not provided, all documents are allowed to "
473 "- `k`: (Required, integer) Number of nearest neighbors to return as top hits. This value must "
474 "be less than `num_candidates`\n"
475 "- `num_candidates`: (Required, integer) The number of nearest neighbor candidates to consider "
476 "per shard. Cannot exceed 10,000. Elasticsearch collects `num_candidates` results from each "
477 "shard, then merges them to find the top k results. Increasing `num_candidates` tends to "
478 "improve the accuracy of the final k results\n"
479 "- `query_vector`: (Optional, array of floats) Query vector. Must have the same number of "
480 "dimensions as the vector field you are searching against\n"
481 "- `query_vector_builder`: (Optional, object) A configuration object indicating how to build a "
482 "`query_vector` before executing the request. You must provide a `query_vector_builder` or "
483 "`query_vector`, but not both\n"
484 "- `similarity`: (Optional, float) The minimum similarity required for a document to be "
485 "considered a match. The similarity value calculated relates to the raw similarity used. Not "
486 "the document score. The matched documents are then scored according to similarity and the "
487 "provided boost is applied\n\n"
488 " The similarity parameter is the direct vector similarity calculation.\n\n"
489 " - `l2_norm`: also known as Euclidean, will include documents where the vector is within the "
490 " dims dimensional hypersphere with radius similarity with origin at query_vector\n"
491 " - `cosine` & `dot_product`: Only return vectors where the cosine similarity or dot-product "
492 " are at least the provided similarity",
495 "type": FloatOrNothingType,
496 "desc":
"Minimum `_score` for matching documents. Documents with a lower `_score` are not included "
497 "in the search results",
500 "type": AutoHashOrNothingType,
501 "desc":
"Limits the search to a point in time (PIT). If you provide a `pit`, you cannot specify a "
502 "`<target>` in the request path.\n\n"
503 "Properties of `pit`:\n"
504 "- `id`: (Required*, string) ID for the PIT to search. If you provide a `pit` object, this "
505 " parameter is required\n"
506 "- `keep_alive`: (Optional, time value) Period of time used to extend the life of the PIT",
509 "type": AutoHashOrNothingType,
510 "desc":
"Specifies the search using the Query DSL",
513 "type": AutoHashOrNothingType,
514 "desc":
"Defines a method for combining and ranking result sets from either:\n"
515 "- 1 query and 1 or more kNN searches\n"
516 "- 2 or more kNN searches\n\n"
518 "- `rrf`: (Optional, object) Sets the ranking method to reciprocal rank fusion (RRF)",
520 "runtime_mappings": {
521 "type": AutoHashOrNothingType,
522 "desc":
"Defines one or more runtime fields in the search request. These fields take precedence over "
523 "mapped fields with the same name.\n\n"
524 "Properties of `runtime_mappings` objects:\n"
525 "- `<field-name>`: (Required, object) Configuration for the runtime field. The key is the field "
527 " Properties of <field-name>:\n"
528 " - `type`: (Required, string) Field type, which can be any of the following:\n"
538 " - `script`: (Optional, string) Painless script executed at query time. The script has access "
539 "to the entire context of a document, including the original `_source` and any mapped fields "
540 "plus their values.\n\n"
541 " This script must include emit to return calculated values. For example:\n"
542 " `\"script\": \"emit(doc['@timestamp'].value.dayOfWeekEnum.toString())\"`",
544 "seq_no_primary_term": {
546 "desc":
"If `true`, returns sequence number and primary term of the last modification of each hit",
549 "type": IntOrNothingType,
550 "desc":
"The number of hits to return. Needs to be non-negative and defaults to `10`.\n\n"
551 "By default, you cannot page through more than 10,000 hits using the `from` and `size` "
552 "parameters. To page through more hits, use the `search_after` parameter",
556 "desc":
"Indicates which source fields are returned for matching documents. These fields are "
557 "returned in the `hits._source` property of the search response.\n\n"
558 "Valid values for `_source`:\n"
559 "- `true`: (Boolean - the default) The entire document source is returned\n"
560 "- `false`: (Boolean) The document source is not returned\n"
561 "- `<wildcard_pattern>`: (string or array of strings) Wildcard (*) pattern or array of patterns "
562 "containing source fields to return\n"
563 "- `<object>`: (object) Object containing a list of source fields to include or exclude\n"
564 " Properties for `<object>`:\n"
565 " - `excludes`: (string or array of strings) Wildcard (*) pattern or array of patterns "
566 "containing source fields to exclude from the response\n\n"
567 " You can also use this property to exclude fields from the subset specified in the "
568 "`includes` property\n"
569 " - `includes`: (string or array of strings) Wildcard (*) pattern or array of patterns "
570 "containing source fields to return\n\n"
571 " If this property is specified, only these source fields are returned. You can exclude "
572 "fields from this subset using the `excludes` property",
575 "type":
new Type(
"*softlist<string>"),
576 "desc":
"Stats groups to associate with the search. Each group maintains a statistics aggregation "
577 "for its associated searches",
580 "type": IntOrNothingType,
581 "desc":
"Maximum number of documents to collect for each shard. If a query reaches "
582 "this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before "
584 "Use with caution. Elasticsearch applies this parameter to each shard handling the request. When "
585 "possible, let Elasticsearch perform early termination automatically. Avoid specifying this "
586 "parameter for requests that target data streams with backing indices across multiple data "
588 "Defaults to `0`, which does not terminate query execution early",
591 "type": StringOrNothingType,
592 "desc":
"Specifies the period of time to wait for a response from each shard. If no response is "
593 "received before the timeout expires, the request fails and returns an error. Defaults to no "
598 "desc":
"If `true` (default `false`), returns document version as part of a hit",
The acknowledged response type.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:28
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 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:53
*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:45
const ProviderInfo
Provider info.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:36
const QueryArgs
Query args.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:56
const RequestType
Request type.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:50
ElasticSearch index search API request.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:108
const Fields
Field descriptions.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:113
constructor()
Creates the object.
ElasticSearch index search API response.
Definition: ElasticSearchIndexSearchDataProvider.qc.dox.h:610
constructor()
Creates the object.
Boolean string type.
Definition: ElasticSearchDataProvider.qc.dox.h:141
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26