diff --git a/packages/components/credentials/ElectricsearchUserPassword.credential.ts b/packages/components/credentials/ElectricsearchUserPassword.credential.ts
index 76b9a0eb..ef4f3490 100644
--- a/packages/components/credentials/ElectricsearchUserPassword.credential.ts
+++ b/packages/components/credentials/ElectricsearchUserPassword.credential.ts
@@ -12,10 +12,11 @@ class ElasticSearchUserPassword implements INodeCredential {
this.name = 'elasticSearchUserPassword'
this.version = 1.0
this.description =
- 'Refer to official guide on how to get User Password from ElasticSearch'
+ `Use Cloud ID field to enter your Elastic Cloud ID or the URL of the Elastic server instance.
+ Refer to official guide on how to get User Password from ElasticSearch.`
this.inputs = [
{
- label: 'Cloud ID or custom server URL',
+ label: 'Cloud ID',
name: 'cloudId',
type: 'string'
},
diff --git a/packages/components/nodes/vectorstores/Elasticsearch/ElasticSearchBase.ts b/packages/components/nodes/vectorstores/Elasticsearch/ElasticSearchBase.ts
index 68c8392a..a1233c21 100644
--- a/packages/components/nodes/vectorstores/Elasticsearch/ElasticSearchBase.ts
+++ b/packages/components/nodes/vectorstores/Elasticsearch/ElasticSearchBase.ts
@@ -145,8 +145,6 @@ export abstract class ElasticSearchBase {
let username = getCredentialParam('username', credentialData, nodeData)
let password = getCredentialParam('password', credentialData, nodeData)
if (cloudId.startsWith('http')) {
- let username = getCredentialParam('username', credentialData, nodeData)
- let password = getCredentialParam('password', credentialData, nodeData)
elasticSearchClientOptions = {
node: cloudId,
auth: {
@@ -157,7 +155,7 @@ export abstract class ElasticSearchBase {
rejectUnauthorized: false
}
}
- } else{
+ } else {
elasticSearchClientOptions = {
cloud: {
id: cloudId
@@ -167,7 +165,7 @@ export abstract class ElasticSearchBase {
password: password
}
}
- }
+ }
}
return elasticSearchClientOptions
}