- Issue created by @mparker17
- Merge request !91Issue #3522107: Connect to an Elastic Cloud Hosted Deployment acting as a Search API Server by entering a Cloud ID and API key → (Open) created by mparker17
- 🇨🇦Canada mparker17 UTC-4
I've added some code in !91; it needs tests; but reviews are welcome.
- 🇨🇦Canada mparker17 UTC-4
We don't have any automated tests for the
basicauth
, and no specific tests for thestandard
connector either. Further,search_api_opensearch
doesn't have any specific automated tests for itsbasicauth
orstandard
connectors either.search_api_solr
has test connectors (i.e.: which serve as test doubles in tests),\Drupal\search_api_solr_test\Plugin\SolrConnector\BasicAuthTestSolrCloudConnector
, and\Drupal\search_api_solr_test\Plugin\SolrConnector\BasicAuthTestSolrConnector
, but thesearch_api_solr
module works in a slightly different way (i.e.: the connectors make the connection to the backend directly; but that's not the case inelasticsearch_connector
andsearch_api_opensearch
).Looking into adding tests for the connectors we have seems non-trivial, so I've created some follow-up issues...
- ✨ Have ElasticSearchConnectorInterface::getClient() return an Elasticsearch ClientInterface instead of a Client Active
- ✨ Add tests for the Connectors Postponed
... and I'm going to suggest that we merge this without tests.
- Status changed to Needs review
12 days ago 2:03am 14 July 2025 - 🇨🇦Canada kdborg@gmail.com
I've created a patch from the change link. The change is connecting to an Elastic Cloud instance and working well.
- 🇨🇦Canada mparker17 UTC-4
Thanks! I'm glad to hear it is working well!
When someone else (i.e.: who didn't write the code) tests the code, and finds it to be working, we mark the issue as "Reviewed & tested by the community", which I'm going to do now!
- 🇧🇪Belgium JeroenT 🇧🇪
We are also using this patch on a project. However, in Elastic Cloud, we are using a serverless project.
This patch was working fine for us, with some extra changes.In BackendClient, we got errors on the /_close and /_open API calls, so we just had to disable those.
But perhaps this is not the right place and this should be handled in a follow-up issue.