# \#opensearch-go

**URL:** https://forum.opensearch.org/tag/opensearch-go/5.md

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

---

## [Opensearch vs opensearchapi module in Go](https://forum.opensearch.org/t/opensearch-vs-opensearchapi-module-in-go/27388)

<div class="topic-metadata">

**Author:** [@Nilushan](https://forum.opensearch.org/u/Nilushan)\
**Replies:** 0\
**Last updated:** [October 30, 2025, 6:45am UTC](https://forum.opensearch.org/t/opensearch-vs-opensearchapi-module-in-go/27388 "2025-10-30T06:45:09Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Describe the issue: I have a confusion regarding which of the the following modules in the OpenSearch Go client I need to use. I am writing a Go program tha…

---

## [Building a CRUD with OpenSearch and Golang](https://forum.opensearch.org/t/building-a-crud-with-opensearch-and-golang/18755)

<div class="topic-metadata">

**Author:** [@riferrei](https://forum.opensearch.org/u/riferrei)\
**Replies:** 1\
**Last updated:** [April 13, 2024, 9:11pm UTC](https://forum.opensearch.org/t/building-a-crud-with-opensearch-and-golang/18755 "2024-04-13T21:11:04Z")

</div>

Hi OpenSearch friends, I recently published a blog post in the community.aws site explaining how to create a CRUD application for OpenSearch using Go. If you are into want to understand how to perform CRUD operations, a…

---

## [Question Regarding OpenSearch-Go Integration and Connection Renewal](https://forum.opensearch.org/t/question-regarding-opensearch-go-integration-and-connection-renewal/18219)

<div class="topic-metadata">

**Author:** [@sumantha](https://forum.opensearch.org/u/sumantha)\
**Replies:** 0\
**Last updated:** [March 2, 2024, 9:41am UTC](https://forum.opensearch.org/t/question-regarding-opensearch-go-integration-and-connection-renewal/18219 "2024-03-02T09:41:12Z")

</div>

Hello OpenSearch Community, I’m currently exploring OpenSearch-Go and AWS integration and have stumbled upon the following code snippet: ctx := context.Background() cfg, \_ := config.LoadDefaultConfig(ctx) endpoint, e…

---

## [Golang opensearch client cause high cpu in opendistro coordinating (client) node](https://forum.opensearch.org/t/golang-opensearch-client-cause-high-cpu-in-opendistro-coordinating-client-node/17723)

<div class="topic-metadata">

**Author:** [@ypeleg](https://forum.opensearch.org/u/ypeleg)\
**Replies:** 0\
**Last updated:** [February 5, 2024, 8:57am UTC](https://forum.opensearch.org/t/golang-opensearch-client-cause-high-cpu-in-opendistro-coordinating-client-node/17723 "2024-02-05T08:57:58Z")

</div>

golang opensearch client library version: v2.3.0 opendistro verion: 1.12 Hi, I am indexing about 7-8K events per second and the coordinating(client) node is reaching 60% I have also python application indexing 60K e…

---

## [Setting socket timeout on golang client](https://forum.opensearch.org/t/setting-socket-timeout-on-golang-client/14736)

<div class="topic-metadata">

**Author:** [@msfroh](https://forum.opensearch.org/u/msfroh)\
**Replies:** 2\
**Last updated:** [June 20, 2023, 8:29pm UTC](https://forum.opensearch.org/t/setting-socket-timeout-on-golang-client/14736 "2023-06-20T20:29:38Z")

</div>

I was recently working with a customer who uses the Go client to connect to OpenSearch and they saw a timeout that propagated back to their users when a node got replaced. From my experience with the Java client, I thou…

---

## [IDE doesn't see Error type in opensearch-go example](https://forum.opensearch.org/t/ide-doesnt-see-error-type-in-opensearch-go-example/14224)

<div class="topic-metadata">

**Author:** [@zhanismagulova26](https://forum.opensearch.org/u/zhanismagulova26)\
**Replies:** 4\
**Last updated:** [May 13, 2023, 2:59pm UTC](https://forum.opensearch.org/t/ide-doesnt-see-error-type-in-opensearch-go-example/14224 "2023-05-13T14:59:54Z")

</div>

Describe the issue: There are occure errors with unresolved type Error But opensearch api see other types in package opensearchapi but not type Error Relevant Logs or Screenshots:

---

## [EOF error when registering about 10000 documents](https://forum.opensearch.org/t/eof-error-when-registering-about-10000-documents/11857)

<div class="topic-metadata">

**Author:** [@sheltie](https://forum.opensearch.org/u/sheltie)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 1:48pm UTC](https://forum.opensearch.org/t/eof-error-when-registering-about-10000-documents/11857 "2022-12-20T13:48:52Z")

</div>

Versions OpenSearch 2.4.0 Opensearch go client Describe the issue: I am creating a program to index documents using go client. After about 10000 documents have been registered, an EOF error occurs and the registrati…

---

## [Export Logs in CSV format](https://forum.opensearch.org/t/export-logs-in-csv-format/11373)

<div class="topic-metadata">

**Author:** [@Gomze1691](https://forum.opensearch.org/u/Gomze1691)\
**Replies:** 3\
**Last updated:** [November 1, 2022, 3:51pm UTC](https://forum.opensearch.org/t/export-logs-in-csv-format/11373 "2022-11-01T15:51:20Z")

</div>

Hi Is there any OpenSearch library in Golang that I can use to export the logs in CSV format? Thanks

---

## [Is golang opensearch.Client goroutine-safe?](https://forum.opensearch.org/t/is-golang-opensearch-client-goroutine-safe/10555)

<div class="topic-metadata">

**Author:** [@jsn0w](https://forum.opensearch.org/u/jsn0w)\
**Replies:** 1\
**Last updated:** [August 10, 2022, 4:32pm UTC](https://forum.opensearch.org/t/is-golang-opensearch-client-goroutine-safe/10555 "2022-08-10T16:32:07Z")

</div>

Apologies if this is something I should easily find out, but it seems I am unable to …and I have been able to find the answer easily for other projects like olivere/elastic project: Is an instance of opensearch.Client s…

---

## [Intended usage of BulkIndexer](https://forum.opensearch.org/t/intended-usage-of-bulkindexer/10382)

<div class="topic-metadata">

**Author:** [@jack-cassidy-roo](https://forum.opensearch.org/u/jack-cassidy-roo)\
**Replies:** 0\
**Last updated:** [July 26, 2022, 1:53pm UTC](https://forum.opensearch.org/t/intended-usage-of-bulkindexer/10382 "2022-07-26T13:53:05Z")

</div>

What is the intended usage of the BulkIndexer struct in the opensearchutil package - as a long-lived object, where one calls Close() on program shutdown, or as a short-lived object where one calls Close() after each “bul…

---

## [How can I get all indices matching a given name pattern from the Golang Client](https://forum.opensearch.org/t/how-can-i-get-all-indices-matching-a-given-name-pattern-from-the-golang-client/9251)

<div class="topic-metadata">

**Author:** [@kmhughes](https://forum.opensearch.org/u/kmhughes)\
**Replies:** 3\
**Last updated:** [April 18, 2022, 6:35pm UTC](https://forum.opensearch.org/t/how-can-i-get-all-indices-matching-a-given-name-pattern-from-the-golang-client/9251 "2022-04-18T18:35:16Z")

</div>

I have created document indexes in OpenSearch of the form prefix-id where prefix is the prefix I want to give all of the indices I create, and then ID is created randomly. What Golang client call can I make that would…

---

## [Opensearch-go bulk request](https://forum.opensearch.org/t/opensearch-go-bulk-request/9190)

<div class="topic-metadata">

**Author:** [@vikaslalwani](https://forum.opensearch.org/u/vikaslalwani)\
**Replies:** 3\
**Last updated:** [April 14, 2022, 10:09pm UTC](https://forum.opensearch.org/t/opensearch-go-bulk-request/9190 "2022-04-14T22:09:32Z")

</div>

I have been unable to find an example for opensearch-go client to trigger a bulk request. The docs just point to the regular API call instead. Can someone help with it. A bulk index request.

---

## [Issue with go client and self signed certificates](https://forum.opensearch.org/t/issue-with-go-client-and-self-signed-certificates/9142)

<div class="topic-metadata">

**Author:** [@thedraketaylor](https://forum.opensearch.org/u/thedraketaylor)\
**Replies:** 0\
**Last updated:** [April 5, 2022, 11:21pm UTC](https://forum.opensearch.org/t/issue-with-go-client-and-self-signed-certificates/9142 "2022-04-05T23:21:55Z")

</div>

I’ve created a cluster with self signed certs. dashboards is connecting fine, and I can use curl to connect to the cluster fine like so: curl --cacert /path/to/cert https://user:password@node1.domain.com:9200 However, w…

---

## [I can't understand something in the opensearch-go example, is it a mistake?](https://forum.opensearch.org/t/i-cant-understand-something-in-the-opensearch-go-example-is-it-a-mistake/9074)

<div class="topic-metadata">

**Author:** [@nethlaria](https://forum.opensearch.org/u/nethlaria)\
**Replies:** 4\
**Last updated:** [March 31, 2022, 1:28am UTC](https://forum.opensearch.org/t/i-cant-understand-something-in-the-opensearch-go-example-is-it-a-mistake/9074 "2022-03-31T01:28:29Z")

</div>

Looking at this: When it defines the mapping, it uses opensearchapi.CreateRequest() but as far as I can see that doesn’t send anything and would need a Do() call. So is that a no-op or does it have some effect I’m not …
