/* SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ /* * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. * * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ // ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ // ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ // ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ // ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ // ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ // ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ // ----------------------------------------------- // // This file is automatically generated // Please do not edit these files manually // Run the following in the root of the repos: // // *NIX : ./build.sh codegen // Windows : build.bat codegen // // ----------------------------------------------- // ReSharper disable RedundantUsingDirective using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using OpenSearch.Net; using OpenSearch.Net.Specification.CatApi; using OpenSearch.Net.Specification.ClusterApi; using OpenSearch.Net.Specification.DanglingIndicesApi; using OpenSearch.Net.Specification.FeaturesApi; using OpenSearch.Net.Specification.IndicesApi; using OpenSearch.Net.Specification.IngestApi; using OpenSearch.Net.Specification.NodesApi; using OpenSearch.Net.Specification.SnapshotApi; using OpenSearch.Net.Specification.TasksApi; using static OpenSearch.Net.HttpMethod; // ReSharper disable InterpolatedStringExpressionIsNotIFormattable // ReSharper disable RedundantExtendsListEntry namespace OpenSearch.Net { /// ///OpenSearch low level client /// public partial class OpenSearchLowLevelClient : IOpenSearchLowLevelClient { public LowLevelCatNamespace Cat { get; private set; } public LowLevelClusterNamespace Cluster { get; private set; } public LowLevelDanglingIndicesNamespace DanglingIndices { get; private set; } public LowLevelFeaturesNamespace Features { get; private set; } public LowLevelIndicesNamespace Indices { get; private set; } public LowLevelIngestNamespace Ingest { get; private set; } public LowLevelNodesNamespace Nodes { get; private set; } public LowLevelSnapshotNamespace Snapshot { get; private set; } public LowLevelTasksNamespace Tasks { get; private set; } partial void SetupNamespaces() { Cat = new LowLevelCatNamespace(this); Cluster = new LowLevelClusterNamespace(this); DanglingIndices = new LowLevelDanglingIndicesNamespace(this); Features = new LowLevelFeaturesNamespace(this); Indices = new LowLevelIndicesNamespace(this); Ingest = new LowLevelIngestNamespace(this); Nodes = new LowLevelNodesNamespace(this); Snapshot = new LowLevelSnapshotNamespace(this); Tasks = new LowLevelTasksNamespace(this); } ///POST on /_bulk https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/ ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Bulk(PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_bulk", body, RequestParams(requestParameters)); ///POST on /_bulk https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/ ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("bulk", "body")] public Task BulkAsync(PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_bulk", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_bulk https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/ ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Bulk(string index, PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_bulk"), body, RequestParams(requestParameters)); ///POST on /{index}/_bulk https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/ ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("bulk", "index, body")] public Task BulkAsync(string index, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_bulk"), ctx, body, RequestParams(requestParameters)); ///DELETE on /_search/scroll https://opensearch.org/docs/latest/opensearch/rest-api/scroll/ ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ClearScroll(PostData body, ClearScrollRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(DELETE, "_search/scroll", body, RequestParams(requestParameters)); ///DELETE on /_search/scroll https://opensearch.org/docs/latest/opensearch/rest-api/scroll/ ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("clear_scroll", "body")] public Task ClearScrollAsync(PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(DELETE, "_search/scroll", ctx, body, RequestParams(requestParameters)); ///POST on /_count https://opensearch.org/docs/latest/opensearch/rest-api/count/ ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Count(PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_count", body, RequestParams(requestParameters)); ///POST on /_count https://opensearch.org/docs/latest/opensearch/rest-api/count/ ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("count", "body")] public Task CountAsync(PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_count", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_count https://opensearch.org/docs/latest/opensearch/rest-api/count/ ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Count(string index, PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_count"), body, RequestParams(requestParameters)); ///POST on /{index}/_count https://opensearch.org/docs/latest/opensearch/rest-api/count/ ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("count", "index, body")] public Task CountAsync(string index, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_count"), ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/_create/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/index-document/ ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Create(string index, string id, PostData body, CreateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(PUT, Url($"{index:index}/_create/{id:id}"), body, RequestParams(requestParameters)); ///PUT on /{index}/_create/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/index-document/ ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("create", "index, id, body")] public Task CreateAsync(string index, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_create/{id:id}"), ctx, body, RequestParams(requestParameters)); ///DELETE on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/delete-document/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Delete(string index, string id, DeleteRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(DELETE, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); ///DELETE on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/delete-document/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("delete", "index, id")] public Task DeleteAsync(string index, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_delete_by_query https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/delete-by-query/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DeleteByQuery(string index, PostData body, DeleteByQueryRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_delete_by_query"), body, RequestParams(requestParameters)); ///POST on /{index}/_delete_by_query https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/delete-by-query/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("delete_by_query", "index, body")] public Task DeleteByQueryAsync(string index, PostData body, DeleteByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_delete_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /_delete_by_query/{task_id}/_rethrottle https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/delete-by-query/ ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DeleteByQueryRethrottle(string taskId, DeleteByQueryRethrottleRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"_delete_by_query/{taskId:taskId}/_rethrottle"), null, RequestParams(requestParameters)); ///POST on /_delete_by_query/{task_id}/_rethrottle https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/delete-by-query/ ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("delete_by_query_rethrottle", "task_id")] public Task DeleteByQueryRethrottleAsync(string taskId, DeleteByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"_delete_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_scripts/{id} ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DeleteScript(string id, DeleteScriptRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(DELETE, Url($"_scripts/{id:id}"), null, RequestParams(requestParameters)); ///DELETE on /_scripts/{id} ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("delete_script", "id")] public Task DeleteScriptAsync(string id, DeleteScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(DELETE, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DocumentExists(string index, string id, DocumentExistsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); ///HEAD on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("exists", "index, id")] public Task DocumentExistsAsync(string index, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/_source/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SourceExists(string index, string id, SourceExistsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/_source/{id:id}"), null, RequestParams(requestParameters)); ///HEAD on /{index}/_source/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("exists_source", "index, id")] public Task SourceExistsAsync(string index, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_explain/{id} https://opensearch.org/docs/latest/opensearch/rest-api/explain/ ///The name of the index ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Explain(string index, string id, PostData body, ExplainRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_explain/{id:id}"), body, RequestParams(requestParameters)); ///POST on /{index}/_explain/{id} https://opensearch.org/docs/latest/opensearch/rest-api/explain/ ///The name of the index ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("explain", "index, id, body")] public Task ExplainAsync(string index, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_explain/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /_field_caps ///An index filter specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse FieldCapabilities(PostData body, FieldCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_field_caps", body, RequestParams(requestParameters)); ///POST on /_field_caps ///An index filter specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("field_caps", "body")] public Task FieldCapabilitiesAsync(PostData body, FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_field_caps", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_field_caps ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///An index filter specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse FieldCapabilities(string index, PostData body, FieldCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_field_caps"), body, RequestParams(requestParameters)); ///POST on /{index}/_field_caps ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///An index filter specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("field_caps", "index, body")] public Task FieldCapabilitiesAsync(string index, PostData body, FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_field_caps"), ctx, body, RequestParams(requestParameters)); ///GET on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Get(string index, string id, GetRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); ///GET on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("get", "index, id")] public Task GetAsync(string index, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /_scripts/{id} ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse GetScript(string id, GetScriptRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, Url($"_scripts/{id:id}"), null, RequestParams(requestParameters)); ///GET on /_scripts/{id} ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("get_script", "id")] public Task GetScriptAsync(string id, GetScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /_script_context ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse GetScriptContext(GetScriptContextRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_script_context", null, RequestParams(requestParameters)); ///GET on /_script_context ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("get_script_context", "")] public Task GetScriptContextAsync(GetScriptContextRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_script_context", ctx, null, RequestParams(requestParameters)); ///GET on /_script_language ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse GetScriptLanguages(GetScriptLanguagesRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_script_language", null, RequestParams(requestParameters)); ///GET on /_script_language ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("get_script_languages", "")] public Task GetScriptLanguagesAsync(GetScriptLanguagesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_script_language", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_source/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Source(string index, string id, SourceRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, Url($"{index:index}/_source/{id:id}"), null, RequestParams(requestParameters)); ///GET on /{index}/_source/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("get_source", "index, id")] public Task SourceAsync(string index, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); ///PUT on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/index-document/ ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Index(string index, string id, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(PUT, Url($"{index:index}/_doc/{id:id}"), body, RequestParams(requestParameters)); ///PUT on /{index}/_doc/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/index-document/ ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("index", "index, id, body")] public Task IndexAsync(string index, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_doc/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_doc https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/index-document/ ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Index(string index, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_doc"), body, RequestParams(requestParameters)); ///POST on /{index}/_doc https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/index-document/ ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("index", "index, body")] public Task IndexAsync(string index, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc"), ctx, body, RequestParams(requestParameters)); ///GET on / https://opensearch.org/docs/latest/opensearch/index/ ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RootNodeInfo(RootNodeInfoRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "", null, RequestParams(requestParameters)); ///GET on / https://opensearch.org/docs/latest/opensearch/index/ ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("info", "")] public Task RootNodeInfoAsync(RootNodeInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "", ctx, null, RequestParams(requestParameters)); ///POST on /_mget https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/ ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiGet(PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_mget", body, RequestParams(requestParameters)); ///POST on /_mget https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/ ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mget", "body")] public Task MultiGetAsync(PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_mget", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_mget https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/ ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiGet(string index, PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_mget"), body, RequestParams(requestParameters)); ///POST on /{index}/_mget https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/ ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mget", "index, body")] public Task MultiGetAsync(string index, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mget"), ctx, body, RequestParams(requestParameters)); ///POST on /_msearch https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearch(PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_msearch", body, RequestParams(requestParameters)); ///POST on /_msearch https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch", "body")] public Task MultiSearchAsync(PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_msearch", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_msearch https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearch(string index, PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_msearch"), body, RequestParams(requestParameters)); ///POST on /{index}/_msearch https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch", "index, body")] public Task MultiSearchAsync(string index, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch"), ctx, body, RequestParams(requestParameters)); ///POST on /_msearch/template https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearchTemplate(PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_msearch/template", body, RequestParams(requestParameters)); ///POST on /_msearch/template https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch_template", "body")] public Task MultiSearchTemplateAsync(PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_msearch/template", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_msearch/template https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearchTemplate(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_msearch/template"), body, RequestParams(requestParameters)); ///POST on /{index}/_msearch/template https://opensearch.org/docs/latest/opensearch/rest-api/multi-search/ ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch_template", "index, body")] public Task MultiSearchTemplateAsync(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch/template"), ctx, body, RequestParams(requestParameters)); ///POST on /_mtermvectors ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiTermVectors(PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_mtermvectors", body, RequestParams(requestParameters)); ///POST on /_mtermvectors ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mtermvectors", "body")] public Task MultiTermVectorsAsync(PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_mtermvectors", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_mtermvectors ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiTermVectors(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_mtermvectors"), body, RequestParams(requestParameters)); ///POST on /{index}/_mtermvectors ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mtermvectors", "index, body")] public Task MultiTermVectorsAsync(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); ///HEAD on / https://opensearch.org/docs/latest/opensearch/index/ ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Ping(PingRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(HEAD, "", null, RequestParams(requestParameters)); ///HEAD on / https://opensearch.org/docs/latest/opensearch/index/ ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("ping", "")] public Task PingAsync(PingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(HEAD, "", ctx, null, RequestParams(requestParameters)); ///PUT on /_scripts/{id} ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse PutScript(string id, PostData body, PutScriptRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(PUT, Url($"_scripts/{id:id}"), body, RequestParams(requestParameters)); ///PUT on /_scripts/{id} ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("put_script", "id, body")] public Task PutScriptAsync(string id, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_scripts/{id}/{context} ///Script ID ///Script context ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse PutScript(string id, string context, PostData body, PutScriptRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(PUT, Url($"_scripts/{id:id}/{context:context}"), body, RequestParams(requestParameters)); ///PUT on /_scripts/{id}/{context} ///Script ID ///Script context ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("put_script", "id, context, body")] public Task PutScriptAsync(string id, string context, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}/{context:context}"), ctx, body, RequestParams(requestParameters)); ///POST on /_rank_eval ///The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse RankEval(PostData body, RankEvalRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_rank_eval", body, RequestParams(requestParameters)); ///POST on /_rank_eval ///The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("rank_eval", "body")] public Task RankEvalAsync(PostData body, RankEvalRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_rank_eval", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_rank_eval ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse RankEval(string index, PostData body, RankEvalRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_rank_eval"), body, RequestParams(requestParameters)); ///POST on /{index}/_rank_eval ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("rank_eval", "index, body")] public Task RankEvalAsync(string index, PostData body, RankEvalRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_rank_eval"), ctx, body, RequestParams(requestParameters)); ///POST on /_reindex https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/reindex/ ///The search definition using the Query DSL and the prototype for the index request. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ReindexOnServer(PostData body, ReindexOnServerRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_reindex", body, RequestParams(requestParameters)); ///POST on /_reindex https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/reindex/ ///The search definition using the Query DSL and the prototype for the index request. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("reindex", "body")] public Task ReindexOnServerAsync(PostData body, ReindexOnServerRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_reindex", ctx, body, RequestParams(requestParameters)); ///POST on /_reindex/{task_id}/_rethrottle https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/reindex/ ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ReindexRethrottle(string taskId, ReindexRethrottleRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"_reindex/{taskId:taskId}/_rethrottle"), null, RequestParams(requestParameters)); ///POST on /_reindex/{task_id}/_rethrottle https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/reindex/ ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("reindex_rethrottle", "task_id")] public Task ReindexRethrottleAsync(string taskId, ReindexRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"_reindex/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); ///POST on /_render/template https://opensearch.org/docs/latest/opensearch/search-template/ ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RenderSearchTemplate(PostData body, RenderSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_render/template", body, RequestParams(requestParameters)); ///POST on /_render/template https://opensearch.org/docs/latest/opensearch/search-template/ ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("render_search_template", "body")] public Task RenderSearchTemplateAsync(PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_render/template", ctx, body, RequestParams(requestParameters)); ///POST on /_render/template/{id} https://opensearch.org/docs/latest/opensearch/search-template/ ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RenderSearchTemplate(string id, PostData body, RenderSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"_render/template/{id:id}"), body, RequestParams(requestParameters)); ///POST on /_render/template/{id} https://opensearch.org/docs/latest/opensearch/search-template/ ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("render_search_template", "id, body")] public Task RenderSearchTemplateAsync(string id, PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"_render/template/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /_scripts/painless/_execute ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse ExecutePainlessScript(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_scripts/painless/_execute", body, RequestParams(requestParameters)); ///POST on /_scripts/painless/_execute ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. ///Note: Experimental within the OpenSearch server, this functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("scripts_painless_execute", "body")] public Task ExecutePainlessScriptAsync(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_scripts/painless/_execute", ctx, body, RequestParams(requestParameters)); ///POST on /_search/scroll https://opensearch.org/docs/latest/opensearch/rest-api/search/#request-body ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Scroll(PostData body, ScrollRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_search/scroll", body, RequestParams(requestParameters)); ///POST on /_search/scroll https://opensearch.org/docs/latest/opensearch/rest-api/search/#request-body ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("scroll", "body")] public Task ScrollAsync(PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_search/scroll", ctx, body, RequestParams(requestParameters)); ///POST on /_search https://opensearch.org/docs/latest/opensearch/rest-api/search/ ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Search(PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_search", body, RequestParams(requestParameters)); ///POST on /_search https://opensearch.org/docs/latest/opensearch/rest-api/search/ ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search", "body")] public Task SearchAsync(PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_search", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_search https://opensearch.org/docs/latest/opensearch/rest-api/search/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Search(string index, PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search"), body, RequestParams(requestParameters)); ///POST on /{index}/_search https://opensearch.org/docs/latest/opensearch/rest-api/search/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search", "index, body")] public Task SearchAsync(string index, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search"), ctx, body, RequestParams(requestParameters)); ///POST on /_search_shards https://opensearch.org/docs/latest/security-plugin/access-control/cross-cluster-search/ ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchShards(SearchShardsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_search_shards", null, RequestParams(requestParameters)); ///POST on /_search_shards https://opensearch.org/docs/latest/security-plugin/access-control/cross-cluster-search/ ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_shards", "")] public Task SearchShardsAsync(SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_search_shards", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_search_shards https://opensearch.org/docs/latest/security-plugin/access-control/cross-cluster-search/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchShards(string index, SearchShardsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search_shards"), null, RequestParams(requestParameters)); ///POST on /{index}/_search_shards https://opensearch.org/docs/latest/security-plugin/access-control/cross-cluster-search/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_shards", "index")] public Task SearchShardsAsync(string index, SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search_shards"), ctx, null, RequestParams(requestParameters)); ///POST on /_search/template https://opensearch.org/docs/latest/opensearch/search-template/ ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchTemplate(PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_search/template", body, RequestParams(requestParameters)); ///POST on /_search/template https://opensearch.org/docs/latest/opensearch/search-template/ ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_template", "body")] public Task SearchTemplateAsync(PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_search/template", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_search/template https://opensearch.org/docs/latest/opensearch/search-template/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchTemplate(string index, PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search/template"), body, RequestParams(requestParameters)); ///POST on /{index}/_search/template https://opensearch.org/docs/latest/opensearch/search-template/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_template", "index, body")] public Task SearchTemplateAsync(string index, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search/template"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors/{id} ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse TermVectors(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_termvectors/{id:id}"), body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors/{id} ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("termvectors", "index, id, body")] public Task TermVectorsAsync(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse TermVectors(string index, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_termvectors"), body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("termvectors", "index, body")] public Task TermVectorsAsync(string index, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_update/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-document/ ///The name of the index ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Update(string index, string id, PostData body, UpdateRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_update/{id:id}"), body, RequestParams(requestParameters)); ///POST on /{index}/_update/{id} https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-document/ ///The name of the index ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("update", "index, id, body")] public Task UpdateAsync(string index, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_update_by_query https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-by-query/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse UpdateByQuery(string index, PostData body, UpdateByQueryRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"{index:index}/_update_by_query"), body, RequestParams(requestParameters)); ///POST on /{index}/_update_by_query https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-by-query/ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("update_by_query", "index, body")] public Task UpdateByQueryAsync(string index, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /_update_by_query/{task_id}/_rethrottle https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-by-query/ ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse UpdateByQueryRethrottle(string taskId, UpdateByQueryRethrottleRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"_update_by_query/{taskId:taskId}/_rethrottle"), null, RequestParams(requestParameters)); ///POST on /_update_by_query/{task_id}/_rethrottle https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-by-query/ ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("update_by_query_rethrottle", "task_id")] public Task UpdateByQueryRethrottleAsync(string taskId, UpdateByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"_update_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); } }