Skip to content

Commit

Permalink
Upgraded to opensearch-rest-client 2.1.0. (#183)
Browse files Browse the repository at this point in the history
* Upgraded to opensearch-rest-client 2.1.0.

Signed-off-by: dblock <[email protected]>

* Renamed to fromMediaType.

See opensearch-project/OpenSearch#3077.

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Jul 20, 2022
1 parent 3caf3d9 commit b4ac4d0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- { opensearch_version: 1.3.3, java: 11 }
- { opensearch_version: 2.0.0, java: 11 }
- { opensearch_version: 2.0.1, java: 11 }
- { opensearch_version: 2.1.0, java: 11 }
steps:
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
Expand Down
19 changes: 4 additions & 15 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,11 @@

The below matrix shows the compatibility of the [`opensearch-java-client`](https://search.maven.org/artifact/org.opensearch.client/opensearch-java) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch).

| OpenSearch Version | Client Version |
| Client Version | OpenSearch Version |
| --- | --- |
| 1.0.0 | 1.0.0 |
| 1.0.1 | 1.0.0 |
| 1.1.0 | 1.0.0 |
| 1.2.0 | 1.0.0 |
| 1.2.1 | 1.0.0 |
| 1.2.2 | 1.0.0 |
| 1.2.3 | 1.0.0 |
| 1.2.4 | 1.0.0 |
| 1.3.0 | 1.0.0 |
| 1.3.1 | 1.0.0 |
| 1.3.2 | 1.0.0 |
| 1.3.3 | 1.0.0 |
| 2.0.0 | 2.0.0 |
| 2.0.1 | 2.0.0 |
| 1.0.0 | 1.0.0-1.3.3 |
| 2.0.0 | 1.3.3-2.0.1 |
| 2.1.0 | 1.3.3-2.1.0 |

## Upgrading

Expand Down
2 changes: 1 addition & 1 deletion config/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.1.0
6 changes: 3 additions & 3 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ val integrationTest = task<Test>("integrationTest") {

dependencies {

val opensearchVersion = "2.0.0"
val jacksonVersion = "2.13.2"
val jacksonDatabindVersion = "2.13.2.2"
val opensearchVersion = "2.1.0"
val jacksonVersion = "2.13.3"
val jacksonDatabindVersion = "2.13.3"

// Apache 2.0
implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static void cleanupClient() throws IOException {
@After
protected void wipeAllOSIndices() throws IOException {
Response response = adminClient().performRequest(new Request("GET", "/_cat/indices?format=json&expand_wildcards=all"));
XContentType xContentType = XContentType.fromMediaTypeOrFormat(response.getEntity().getContentType().getValue());
XContentType xContentType = XContentType.fromMediaType(response.getEntity().getContentType().getValue());
XContentParser parser = xContentType.xContent().createParser(
NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION,
response.getEntity().getContent());
Expand Down

0 comments on commit b4ac4d0

Please sign in to comment.