# \#opensearch-js

**URL:** https://forum.opensearch.org/tag/opensearch-js/3.md

[Latest](https://forum.opensearch.org/latest.md) · [Categories](https://forum.opensearch.org/categories.md) · [Tags](https://forum.opensearch.org/tags.md)

---

## [Setting Connection Timeout Value for opensearch-py](https://forum.opensearch.org/t/setting-connection-timeout-value-for-opensearch-py/8796)

<div class="topic-metadata">

**Author:** [@patrick](https://forum.opensearch.org/u/patrick)\
**Replies:** 2\
**Last updated:** [October 8, 2025, 12:35am UTC](https://forum.opensearch.org/t/setting-connection-timeout-value-for-opensearch-py/8796 "2025-10-08T00:35:07Z")

</div>

Hi, looking for a way to set a fail-fast timeout on connections to OpenSearch. I’ve tried setting timeout=5 from the client instantiation, but i’m still seeing 10 second exceptions, as set in https://github.com/opensea…

---

## [Expected value for javascript bulk helper configuration value](https://forum.opensearch.org/t/expected-value-for-javascript-bulk-helper-configuration-value/19421)

<div class="topic-metadata">

**Author:** [@datarace](https://forum.opensearch.org/u/datarace)\
**Replies:** 0\
**Last updated:** [May 16, 2024, 6:39pm UTC](https://forum.opensearch.org/t/expected-value-for-javascript-bulk-helper-configuration-value/19421 "2024-05-16T18:39:24Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch version 2.13 OpensearchJS Client NPM version: “@opensearch-project/opensearch”: “^2.6.0” Describe the issue: Opensearch Javascript Client docum…

---

## [Unrelated Documents Update on specific document update](https://forum.opensearch.org/t/unrelated-documents-update-on-specific-document-update/18991)

<div class="topic-metadata">

**Author:** [@josh\_kish](https://forum.opensearch.org/u/josh_kish)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 9:24am UTC](https://forum.opensearch.org/t/unrelated-documents-update-on-specific-document-update/18991 "2024-04-23T09:24:43Z")

</div>

client - nodejs version - “@opensearch-project/opensearch”: “^2.5.0”, I have documents i want to update. Upon calling this.opensearch.update({ { index: OpensearchConfig.getConfig('index'), id: id, bo…

---

## [OpenSearch AWS Serverless JS](https://forum.opensearch.org/t/opensearch-aws-serverless-js/17963)

<div class="topic-metadata">

**Author:** [@benjabreeg](https://forum.opensearch.org/u/benjabreeg)\
**Replies:** 0\
**Last updated:** [February 19, 2024, 2:52pm UTC](https://forum.opensearch.org/t/opensearch-aws-serverless-js/17963 "2024-02-19T14:52:40Z")

</div>

Hello we are deploying an app in Type Script that runs in a AWS ECS cluster and we would like to stream our logs into Opensearch Serverless in AWS. We are trying with this sample code JavaScript client - OpenSearch Doc…

---

## [Types in Opensearch JS Client](https://forum.opensearch.org/t/types-in-opensearch-js-client/17326)

<div class="topic-metadata">

**Author:** [@tobe](https://forum.opensearch.org/u/tobe)\
**Replies:** 0\
**Last updated:** [January 4, 2024, 7:53am UTC](https://forum.opensearch.org/t/types-in-opensearch-js-client/17326 "2024-01-04T07:53:50Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): @opensearch-project/opensearch": “^2.4.0” Describe the issue: We have recently migrated from Elasticsearch to Opensearch. We have substituted @elastic/elas…

---

## [CredentialsProviderError: Role Arn 'XXX' needs to be assumed with web identity, but no role assumption callback was provided](https://forum.opensearch.org/t/credentialsprovidererror-role-arn-xxx-needs-to-be-assumed-with-web-identity-but-no-role-assumption-callback-was-provided/10611)

<div class="topic-metadata">

**Author:** [@openjpa](https://forum.opensearch.org/u/openjpa)\
**Replies:** 5\
**Last updated:** [September 20, 2023, 7:54pm UTC](https://forum.opensearch.org/t/credentialsprovidererror-role-arn-xxx-needs-to-be-assumed-with-web-identity-but-no-role-assumption-callback-was-provided/10611 "2023-09-20T19:54:22Z")

</div>

Good afternoon, Some days I try to connect with OpenSearch without success with NodeJS. I tried following the documentation but it only worked using aws\_access\_key\_id and aws\_secret\_access\_key https://docs.aws.amazon.…

---

## [Node-js: client.helpers.bulk() : get errors on fail?](https://forum.opensearch.org/t/node-js-client-helpers-bulk-get-errors-on-fail/14200)

<div class="topic-metadata">

**Author:** [@Tegatoo](https://forum.opensearch.org/u/Tegatoo)\
**Replies:** 2\
**Last updated:** [May 4, 2023, 5:02pm UTC](https://forum.opensearch.org/t/node-js-client-helpers-bulk-get-errors-on-fail/14200 "2023-05-04T17:02:37Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.7.x Describe the issue: Consider a code: try { var response = await this.client.helpers.bulk({ datasource: upserts, onDocumen…

---

## [Rewrite the client to TypeScript \[Help wanted\] \[CCI\]](https://forum.opensearch.org/t/rewrite-the-client-to-typescript-help-wanted-cci/13359)

<div class="topic-metadata">

**Author:** [@timursaurus](https://forum.opensearch.org/u/timursaurus)\
**Replies:** 1\
**Last updated:** [March 26, 2023, 11:50am UTC](https://forum.opensearch.org/t/rewrite-the-client-to-typescript-help-wanted-cci/13359 "2023-03-26T11:50:29Z")

</div>

Describe the issue: Rewriting the while client from JavaScript to TypeScript, including the test suite. Additionally, improving (IMO.) the folder structure of the project. Help wanted! Learn more at: Issue If you’r…

---

## [Opensearch-js: rolesmapping api](https://forum.opensearch.org/t/opensearch-js-rolesmapping-api/12676)

<div class="topic-metadata">

**Author:** [@Vasyl](https://forum.opensearch.org/u/Vasyl)\
**Replies:** 1\
**Last updated:** [February 27, 2023, 2:21pm UTC](https://forum.opensearch.org/t/opensearch-js-rolesmapping-api/12676 "2023-02-27T14:21:07Z")

</div>

Hi, I am using latest opensearch-js library to interact with my cluster with fine-grained policy enabled. Is there a way to send rolesmapping api calls to the cluster?

---

## [I can't escape special characters \[opensearch\]](https://forum.opensearch.org/t/i-cant-escape-special-characters-opensearch/11609)

<div class="topic-metadata">

**Author:** [@benve](https://forum.opensearch.org/u/benve)\
**Replies:** 1\
**Last updated:** [December 14, 2022, 5:31pm UTC](https://forum.opensearch.org/t/i-cant-escape-special-characters-opensearch/11609 "2022-12-14T17:31:08Z")

</div>

Versions: node: v10.14.1 @opensearch-project/opensearch: ^2.1.0 opensearch docker container: 2.4.0 Describe the issue: Hi everyone, I can’t understand how to escape dash when I send the query to opensearch. I’m us…

---

## [Where is JS Client documentation? Examples?](https://forum.opensearch.org/t/where-is-js-client-documentation-examples/9568)

<div class="topic-metadata">

**Author:** [@latemetal](https://forum.opensearch.org/u/latemetal)\
**Replies:** 1\
**Last updated:** [November 17, 2022, 5:20pm UTC](https://forum.opensearch.org/t/where-is-js-client-documentation-examples/9568 "2022-11-17T17:20:17Z")

</div>

I have been trying to figure out how to use this client, namely client.bulk but there is no docs to even explain what the parameters should be. Any help would be appreciated.

---

## [OpenSearch Integration tests with Jest](https://forum.opensearch.org/t/opensearch-integration-tests-with-jest/8286)

<div class="topic-metadata">

**Author:** [@kabethy](https://forum.opensearch.org/u/kabethy)\
**Replies:** 1\
**Last updated:** [October 6, 2022, 3:29pm UTC](https://forum.opensearch.org/t/opensearch-integration-tests-with-jest/8286 "2022-10-06T15:29:18Z")

</div>

Hi, I am using OpenSearch in a Nx monorepo in a node js Serverless app that connects to aws services. I would like to use jest to test but so far I have not been able to get responses from OpenSearch. Even if I use …

---

## [Nodejs opensearch client: how to useSQL](https://forum.opensearch.org/t/nodejs-opensearch-client-how-to-usesql/7682)

<div class="topic-metadata">

**Author:** [@bdeboer](https://forum.opensearch.org/u/bdeboer)\
**Replies:** 1\
**Last updated:** [November 19, 2021, 1:50am UTC](https://forum.opensearch.org/t/nodejs-opensearch-client-how-to-usesql/7682 "2021-11-19T01:50:29Z")

</div>

I’m converting from the elasticsearch to the opensearch nodejs library, and I’m struggling to get SQL queries to work. I have: import \* as os from "@opensearch-project/opensearch" const client = new os.Client({...}) a…

---

## [Opensearch JavaScript client](https://forum.opensearch.org/t/opensearch-javascript-client/7266)

<div class="topic-metadata">

**Author:** [@clenkiu](https://forum.opensearch.org/u/clenkiu)\
**Replies:** 4\
**Last updated:** [October 14, 2021, 3:10pm UTC](https://forum.opensearch.org/t/opensearch-javascript-client/7266 "2021-10-14T15:10:26Z")

</div>

Is there any plan to support SAML authentication to the OpenSearch JavaScript client? I mean, implementing an API similar to the existing elasticsearch nodejs client. If not. Is there a way to authenticate users with…

---

## [Aws-elasticsearch-connector analog for opensearch-js?](https://forum.opensearch.org/t/aws-elasticsearch-connector-analog-for-opensearch-js/7192)

<div class="topic-metadata">

**Author:** [@Ghazgkull](https://forum.opensearch.org/u/Ghazgkull)\
**Replies:** 4\
**Last updated:** [October 6, 2021, 4:00pm UTC](https://forum.opensearch.org/t/aws-elasticsearch-connector-analog-for-opensearch-js/7192 "2021-10-06T16:00:37Z")

</div>

Are there plans to make something like the aws-elasticsearch-connector available to connect to AWS ElasticSearch using the opensearch-js client? Is the answer any different for connecting to AWS OpenSearch?
