Skip to content

Commit

Permalink
Added comment for special use case for the LowLevelClusterNamespace.
Browse files Browse the repository at this point in the history
Signed-off-by: Djcarrillo6 <[email protected]>
  • Loading branch information
Djcarrillo6 committed Oct 11, 2023
1 parent c567a13 commit 47686dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion guides/index-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ Index templates allow you to define default settings, mappings, and aliases for
Assuming you have OpenSearch running locally on port 9200, you can create a client instance with the following code:

```csharp
using OpenSearch.Client;
using OpenSearch.Net;
using OpenSearch.Net.Specification.ClusterApi;

var node = new Uri("https://localhost:9200");
var config = new ConnectionConfiguration(node)
.ServerCertificateValidationCallback(CertificateValidations.AllowAll)
.BasicAuthentication("admin", "admin");

var client = new OpenSearchLowLevelClient(config);;

// The PutComponentTemplate method is not yet implemented in the low-level client, so you need to use an instance of the LowLevelClusterNamespace class which contains the PutComponentTemplate method.
LowLevelClusterNamespace cluster = client.Cluster;
```


Expand Down

0 comments on commit 47686dc

Please sign in to comment.