Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Blog] Introducing OpenSearch Client 3.0 #3536

Merged
merged 5 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion _community_members/theotr.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
- title: 'Theo Truong's Profile'
url: '/community/members/theo-truong.html'
github: nhtruong
linkedin: nam-theo-truong-9557905a
job_title_and_company: 'Software Engineer at AWS working on OpenSearch'
personas:
- author
permalink: '/community/members/theo-truong.html'
redirect_from: '/authors/theotr/'
---

**Theo Truong** is a Software Engineer at AWS working on OpenSearch.
**Theo Truong** is a Software Engineer at AWS working on OpenSearch clients and API specification.

Check failure on line 25 in _community_members/theotr.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: Theo. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: Theo. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_community_members/theotr.md", "range": {"start": {"line": 25, "column": 3}}}, "severity": "ERROR"}

Check failure on line 25 in _community_members/theotr.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: Truong. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: Truong. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_community_members/theotr.md", "range": {"start": {"line": 25, "column": 8}}}, "severity": "ERROR"}
46 changes: 46 additions & 0 deletions _posts/2025-01-22-Introducing-OpenSearch-JS-Client-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: post
title: "Introducing OpenSearch JavaScript client 3.0"
authors:
- theotr
- kolchfa
date: 2025-01-09
nhtruong marked this conversation as resolved.
Show resolved Hide resolved
categories:
- release
meta_keywords: javascript, typescript, client, api, opensearch, release, codegen, api generator
meta_description: Release announcement for OpenSearch JS Client 3.0.0, a major overhaul of the client's API for better readability, consistency, and a more complete and accurate interface to interact with OpenSearch clusters.
nhtruong marked this conversation as resolved.
Show resolved Hide resolved
has_math: false
has_science_table: false
---

We're excited to announce the release of OpenSearch JavaScript client 3.0.0. This version introduces significant improvements, including enhanced readability and consistency and a more accurate interface for interacting with OpenSearch clusters.

The new [API generator](https://github.com/opensearch-project/opensearch-js/tree/main/api_generator) enables frequent and accurate updates to the client, ensuring it reflects the latest changes in OpenSearch.

## Improved API coverage using automated updates

Version 3.0.0 introduces over 100 new API functions compared to version 2.13.0, all generated from the [OpenSearch API specification](https://github.com/opensearch-project/opensearch-api-specification), which currently covers about 60% of the OpenSearch API. All existing API functions have been updated to align with the latest API spec.

To keep things current, we've added a GitHub workflow that automatically updates the client every week, ensuring that the client is always up to date with the latest OpenSearch API. This means that you always have access to the latest OpenSearch features through the client.

For the client repository maintainers, this automation reduces the manual effort required to sync the client with the API spec. It allows us to focus on improving the client's performance, stability, and functionality while addressing API function gaps by [adding the missing APIs to the API specification](https://github.com/opensearch-project/opensearch-api-specification?tab=readme-ov-file#welcome). With the new API generator, you'll encounter fewer issues related to outdated API functions, creating a smoother experience whether you're a maintainer or a user.

## Enhanced TypeScript support

In previous versions, the client relied on incomplete and outdated types for requests and responses, which were manually written. Version 3.0.0 resolves this problem by generating types directly from the OpenSearch API specification.

These new type definitions make it easier for your IDE or AI coding assistants to provide accurate autocomplete suggestions and perform type checks. If you use TypeScript, you'll notice faster development and fewer bugs, significantly improving your experience.

## Removing support for outdated features

This major update also removes features that are no longer needed or have been replaced by better alternatives:

- **No more HTTP method overrides:** Previously, some API functions allowed you to override the HTTP method using a `method` parameter. Now `method` is treated as a query string parameter, and using it may cause errors. To send custom requests, use the `client.http` namespace.
- **No camelCase parameters:** API functions now only accept parameters matching the OpenSearch API specification. These parameters align with what the OpenSearch server expects.

Check failure on line 39 in _posts/2025-01-22-Introducing-OpenSearch-JS-Client-3.0.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: camelCase. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: camelCase. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_posts/2025-01-22-Introducing-OpenSearch-JS-Client-3.0.md", "range": {"start": {"line": 39, "column": 8}}}, "severity": "ERROR"}
- **Dropped support for older Node.js versions:** The client now requires Node.js 14 or later. If you're still using Node.js 10 or 12, we recommend upgrading to the latest LTS version.

As with any major update, these updates, along with the new typing system, may introduce breaking changes. For a detailed list of changes and deprecations, see the [UPGRADING guide](https://github.com/opensearch-project/opensearch-js/blob/main/UPGRADING.md).

## Share your feedback

We're excited to see the applications you build using the new OpenSearch JavaScript client 3.0.0. If you have questions or feedback, feel free to create an issue in the [JavaScript client GitHub repository](https://github.com/opensearch-project/opensearch-js). Your input helps us improve the client, making it easier for you to interact with OpenSearch clusters.
Binary file modified assets/media/community/members/theotr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading