Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/integration-yaml-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
fail-fast: false
matrix:
version:
- 3.6.0
- 3.4.0
- 3.2.0
- 3.0.0
- 2.19.5
- 2.17.1
- 2.16.0
- 2.14.0
- 2.12.0
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
fail-fast: false
matrix:
version:
- 3.6.0
- 3.4.0
- 3.2.0
- 3.0.0
- 2.16.0
- 2.14.0
- 2.12.0
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Dependencies
- Bumps `System.Diagnostics.DiagnosticSource` from 6.0.1 to 8.0.1
- Bumps `YamlDotNet` from 16.0.0 to 16.3.0
- Bumps `AWSSDK.Core` from 3.7.400.11 to 4.0.7.1
- Bumps `AWSSDK.Core` from 3.7.400.11 to 4.0.7.4
- Bumps `Fake.Core.SemVer` from 6.1.0 to 6.1.3
- Bumps `Bogus` from 35.6.0 to 35.6.3
- Bumps `Fake.Core.Environment` from 6.1.0 to 6.1.3
Expand Down
3 changes: 2 additions & 1 deletion COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ The below matrix shows the compatibility of the [`opensearch-net`](https://www.n
| OpenSearch Version | Client Version |
|--------------------|----------------|
| 1.x | 1.0.0, 1.1.0 |
| 2.x | 1.1.0 |
| 2.x | 1.1.0, 2.0.0 |
| 3.x | 2.0.0 |

## Upgrading

Expand Down
4 changes: 2 additions & 2 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ build.sh
OpenSearch publishes an [OpenAPI specification](https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml) in the [opensearch-api-specification](https://github.com/opensearch-project/opensearch-api-specification) repository, which is used to auto-generate the less interesting parts of the client.

```
./build.sh codegen --branch main
./build.sh codegen --branch main --include-high-level --download
```
or
```
./build.bat codegen --branch main
./build.bat codegen --branch main --include-high-level --download
```
2 changes: 2 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@

#### General
- Support for .NET Framework v4.6.1 has been removed, if you have a .NET Framework based project it is recommended to upgrade the project to target .NET Framework v4.7.2 or higher.
- Support for dotnet 5 and dotnet 6 has been removed as they are EOL. Upgrade to dotnet 8 or higher.
- The `MasterTimeSpanout` & `ClusterManagerTimeSpanout` parameters on all actions have been corrected to `MasterTimeout` and `ClusterManagerTimeout` respectively.
- The `MasterTimeout` parameters on all actions have been marked `[Obsolete]`, please migrate to using `ClusterManagerTimeout` if your OpenSearch cluster is at least version `2.0.0` as `MasterTimeout` may be removed in future major versions.
- The `ExpandWildcards` enum is now attributed with `[Flags]` to allow combining of multiple values e.g. `ExpandWildcards.Open | ExpandWildcards.Closed` to match open and closed indexes but not hidden.
- The `Bytes` enum has been renamed to `ByteUnit`.
- All instances of the `Routing` parameter now accept an array of strings instead of a single string to better represent the underlying API that accepts comma-separated lists.
- The `SortOrder` enum has been moved from the `OpenSearch.Client` namespace to the `OpenSearch.Net` namespace.
- The `TimeUnit` enum has been moved from the `OpenSearch.Client` namespace to the `OpenSearch.Net` namespace. The `Millisecond`, `Second`, `Minute`, `Hour` and `Day` variants names have been pluralized to `Milliseconds`, `Seconds`, `Minutes`, `Hours` and `Days` respectively.
- `VersionType.Force` enum was removed as it is no longer in the specification

#### Bulk Action
- The `TypeQueryString` parameter has been renamed to simply `Type`.
Expand Down
4,209 changes: 2,917 additions & 1,292 deletions src/ApiGenerator/opensearch-openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/OpenSearch.Client/_Generated/Descriptors.Ingest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public GrokProcessorPatternsDescriptor SortByColumns(bool? sortbycolumns = true)
Qs("s", sortbycolumns);
}

/// <summary>Descriptor for PutPipeline <para>https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</para></summary>
/// <summary>Descriptor for PutPipeline <para>https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</para></summary>
public partial class PutPipelineDescriptor
: RequestDescriptorBase<
PutPipelineDescriptor,
Expand Down
4 changes: 4 additions & 0 deletions src/OpenSearch.Client/_Generated/Descriptors.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,10 @@ public MultiSearchDescriptor Index<TOther>()
public MultiSearchDescriptor AllIndices() => Index(Indices.All);

// Request parameters
/// <summary>Specifies whether to return partial results if there are shard request timeouts or shard failures.</summary>
public MultiSearchDescriptor AllowPartialResults(bool? allowpartialresults = true) =>
Qs("allow_partial_results", allowpartialresults);

/// <summary>If <c>true</c>, network round-trips between the coordinating node and remote clusters are minimized for cross-cluster search requests.</summary>
public MultiSearchDescriptor CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true) =>
Qs("ccs_minimize_roundtrips", ccsminimizeroundtrips);
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/_Generated/Descriptors.Snapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public GetSnapshotDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) =
public GetSnapshotDescriptor MasterTimeout(Time mastertimeout) =>
Qs("master_timeout", mastertimeout);

/// <summary>When <c>true</c>, returns additional information about each snapshot such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards contained in the snapshot.</summary>
/// <summary>When <c>true</c>, returns additional information about each snapshot, such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards contained in the snapshot. When <c>false</c>, returns only snapshot names and contained indexes. This is useful when the snapshots belong to a cloud-based repository, where each blob read is a cost or performance concern.</summary>
public GetSnapshotDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose);
}

Expand Down
16 changes: 8 additions & 8 deletions src/OpenSearch.Client/_Generated/OpenSearchClient.Ingest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Task<GrokProcessorPatternsResponse> GrokProcessorPatternsAsync(
/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
PutPipelineResponse PutPipeline(
Id id,
Expand All @@ -180,7 +180,7 @@ Func<PutPipelineDescriptor, IPutPipelineRequest> selector
/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
Task<PutPipelineResponse> PutPipelineAsync(
Id id,
Expand All @@ -191,14 +191,14 @@ Task<PutPipelineResponse> PutPipelineAsync(
/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
PutPipelineResponse PutPipeline(IPutPipelineRequest request);

/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
Task<PutPipelineResponse> PutPipelineAsync(
IPutPipelineRequest request,
Expand Down Expand Up @@ -397,7 +397,7 @@ public Task<GrokProcessorPatternsResponse> GrokProcessorPatternsAsync(
/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
public PutPipelineResponse PutPipeline(
Id id,
Expand All @@ -407,7 +407,7 @@ Func<PutPipelineDescriptor, IPutPipelineRequest> selector
/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
public Task<PutPipelineResponse> PutPipelineAsync(
Id id,
Expand All @@ -418,15 +418,15 @@ public Task<PutPipelineResponse> PutPipelineAsync(
/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
public PutPipelineResponse PutPipeline(IPutPipelineRequest request) =>
DoRequest<IPutPipelineRequest, PutPipelineResponse>(request, request.RequestParameters);

/// <summary>
/// <c>PUT</c> request to the <c>ingest.put_pipeline</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/">https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</a>
/// <a href="https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/">https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</a>
/// </summary>
public Task<PutPipelineResponse> PutPipelineAsync(
IPutPipelineRequest request,
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/_Generated/Requests.Ingest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public partial interface IPutPipelineRequest : IRequest<PutPipelineRequestParame
Id Id { get; }
}

/// <summary>Request for PutPipeline <para>https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</para></summary>
/// <summary>Request for PutPipeline <para>https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</para></summary>
public partial class PutPipelineRequest
: PlainRequestBase<PutPipelineRequestParameters>,
IPutPipelineRequest
Expand Down
7 changes: 7 additions & 0 deletions src/OpenSearch.Client/_Generated/Requests.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,13 @@ public MultiSearchRequest(Indices index)
Indices IMultiSearchRequest.Index => Self.RouteValues.Get<Indices>("index");

// Request parameters
/// <summary>Specifies whether to return partial results if there are shard request timeouts or shard failures.</summary>
public bool? AllowPartialResults
{
get => Q<bool?>("allow_partial_results");
set => Q("allow_partial_results", value);
}

/// <summary>If <c>true</c>, network round-trips between the coordinating node and remote clusters are minimized for cross-cluster search requests.</summary>
public bool? CcsMinimizeRoundtrips
{
Expand Down
6 changes: 4 additions & 2 deletions src/OpenSearch.Client/_Generated/Requests.Snapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,10 @@ public Time MasterTimeout
}

/// <summary>
/// When <c>true</c>, returns additional information about each snapshot such as the version of OpenSearch which took the snapshot, the start
/// and end times of the snapshot, and the number of shards contained in the snapshot.
/// When <c>true</c>, returns additional information about each snapshot, such as the version of OpenSearch which took the snapshot, the start
/// and end times of the snapshot, and the number of shards contained in the snapshot. When <c>false</c>, returns only snapshot names and
/// contained indexes. This is useful when the snapshots belong to a cloud-based repository, where each blob read is a cost or performance
/// concern.
/// </summary>
public bool? Verbose
{
Expand Down
47 changes: 43 additions & 4 deletions src/OpenSearch.Net/_Generated/Api/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,22 @@ public enum MlFunctionName
TextSimilarity,
}

[Flags, StringEnum]
public enum MlMemoryType
{
[EnumMember(Value = "history")]
History = 1 << 0,

[EnumMember(Value = "long-term")]
LongTerm = 1 << 1,

[EnumMember(Value = "sessions")]
Sessions = 1 << 2,

[EnumMember(Value = "working")]
Working = 1 << 3,
}

[Flags, StringEnum]
public enum MlStatName
{
Expand Down Expand Up @@ -653,9 +669,15 @@ public enum MlToolName
[EnumMember(Value = "PPLTool")]
Ppltool,

[EnumMember(Value = "QueryPlanningTool")]
Queryplanningtool,

[EnumMember(Value = "RAGTool")]
Ragtool,

[EnumMember(Value = "ReadFromScratchPadTool")]
Readfromscratchpadtool,

[EnumMember(Value = "SearchAlertsTool")]
Searchalertstool,

Expand All @@ -676,6 +698,9 @@ public enum MlToolName

[EnumMember(Value = "VisualizationTool")]
Visualizationtool,

[EnumMember(Value = "WriteToScratchPadTool")]
Writetoscratchpadtool,
}

[Flags, StringEnum]
Expand Down Expand Up @@ -1270,9 +1295,6 @@ public enum VersionType
[EnumMember(Value = "external_gte")]
ExternalGte,

[EnumMember(Value = "force")]
Force,

[EnumMember(Value = "internal")]
Internal,
}
Expand Down Expand Up @@ -1328,6 +1350,7 @@ static partial void RegisterEnumStringResolvers()
AddEnumStringResolver<Level>(GetStringValue);
AddEnumStringResolver<LtrStatName>(GetStringValue);
AddEnumStringResolver<MlFunctionName>(GetStringValue);
AddEnumStringResolver<MlMemoryType>(GetStringValue);
AddEnumStringResolver<MlStatName>(GetStringValue);
AddEnumStringResolver<MlToolName>(GetStringValue);
AddEnumStringResolver<NeuralStatName>(GetStringValue);
Expand Down Expand Up @@ -1743,6 +1766,20 @@ public static string GetStringValue(this MlFunctionName enumValue) =>
),
};

public static string GetStringValue(this MlMemoryType enumValue)
{
var list = new List<string>();
if ((enumValue & MlMemoryType.History) != 0)
list.Add("history");
if ((enumValue & MlMemoryType.LongTerm) != 0)
list.Add("long-term");
if ((enumValue & MlMemoryType.Sessions) != 0)
list.Add("sessions");
if ((enumValue & MlMemoryType.Working) != 0)
list.Add("working");
return string.Join(",", list);
}

public static string GetStringValue(this MlStatName enumValue)
{
var list = new List<string>();
Expand Down Expand Up @@ -1776,14 +1813,17 @@ public static string GetStringValue(this MlToolName enumValue) =>
MlToolName.Mlmodeltool => "MLModelTool",
MlToolName.Neuralsparsesearchtool => "NeuralSparseSearchTool",
MlToolName.Ppltool => "PPLTool",
MlToolName.Queryplanningtool => "QueryPlanningTool",
MlToolName.Ragtool => "RAGTool",
MlToolName.Readfromscratchpadtool => "ReadFromScratchPadTool",
MlToolName.Searchalertstool => "SearchAlertsTool",
MlToolName.Searchanomalydetectorstool => "SearchAnomalyDetectorsTool",
MlToolName.Searchanomalyresultstool => "SearchAnomalyResultsTool",
MlToolName.Searchindextool => "SearchIndexTool",
MlToolName.Searchmonitorstool => "SearchMonitorsTool",
MlToolName.Vectordbtool => "VectorDBTool",
MlToolName.Visualizationtool => "VisualizationTool",
MlToolName.Writetoscratchpadtool => "WriteToScratchPadTool",
_ => throw new ArgumentException(
$"'{enumValue.ToString()}' is not a valid value for enum 'MlToolName'"
),
Expand Down Expand Up @@ -2226,7 +2266,6 @@ public static string GetStringValue(this VersionType enumValue) =>
{
VersionType.External => "external",
VersionType.ExternalGte => "external_gte",
VersionType.Force => "force",
VersionType.Internal => "internal",
_ => throw new ArgumentException(
$"'{enumValue.ToString()}' is not a valid value for enum 'VersionType'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public bool? SortByColumns
}
}

/// <summary>Request options for PutPipeline <para>https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/</para></summary>
/// <summary>Request options for PutPipeline <para>https://docs.opensearch.org/latest/ingest-pipelines/create-ingest/</para></summary>
public partial class PutPipelineRequestParameters
: RequestParameters<PutPipelineRequestParameters>
{
Expand Down
Loading
Loading