diff --git a/plugins/search-backend-module-elasticsearch/api-report.md b/plugins/search-backend-module-elasticsearch/api-report.md
index 1e798119c3..6dc0256586 100644
--- a/plugins/search-backend-module-elasticsearch/api-report.md
+++ b/plugins/search-backend-module-elasticsearch/api-report.md
@@ -3,18 +3,103 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
-import { Client } from '@elastic/elasticsearch';
+///
+
import { Config } from '@backstage/config';
+import type { ConnectionOptions } from 'tls';
import { IndexableDocument } from '@backstage/search-common';
import { Logger as Logger_2 } from 'winston';
import { SearchEngine } from '@backstage/search-common';
import { SearchQuery } from '@backstage/search-common';
import { SearchResultSet } from '@backstage/search-common';
+// Warning: (ae-missing-release-tag) "ElasticSearchClientOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/plugin-search-backend-module-elasticsearch" does not have an export "ElasticSearchEngine"
+//
+// @public
+export interface ElasticSearchClientOptions {
+ // Warning: (ae-forgotten-export) The symbol "ElasticSearchAgentOptions" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ agent?: ElasticSearchAgentOptions | ((opts?: any) => unknown) | false;
+ // Warning: (ae-forgotten-export) The symbol "ElasticSearchAuth" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ auth?: ElasticSearchAuth;
+ // (undocumented)
+ cloud?: {
+ id: string;
+ username?: string;
+ password?: string;
+ };
+ // (undocumented)
+ compression?: 'gzip';
+ // Warning: (ae-forgotten-export) The symbol "ElasticSearchConnectionConstructor" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ Connection?: ElasticSearchConnectionConstructor;
+ // (undocumented)
+ disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor';
+ // (undocumented)
+ enableMetaHeader?: boolean;
+ // (undocumented)
+ headers?: Record;
+ // (undocumented)
+ maxRetries?: number;
+ // (undocumented)
+ name?: string | symbol;
+ // Warning: (ae-forgotten-export) The symbol "ElasticSearchNodeOptions" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ node?:
+ | string
+ | string[]
+ | ElasticSearchNodeOptions
+ | ElasticSearchNodeOptions[];
+ // (undocumented)
+ nodeFilter?: (connection: any) => boolean;
+ // (undocumented)
+ nodes?:
+ | string
+ | string[]
+ | ElasticSearchNodeOptions
+ | ElasticSearchNodeOptions[];
+ // (undocumented)
+ nodeSelector?: ((connections: any[]) => any) | string;
+ // (undocumented)
+ opaqueIdPrefix?: string;
+ // (undocumented)
+ pingTimeout?: number;
+ // (undocumented)
+ provider?: 'aws' | 'elastic';
+ // (undocumented)
+ proxy?: string | URL;
+ // (undocumented)
+ requestTimeout?: number;
+ // (undocumented)
+ resurrectStrategy?: 'ping' | 'optimistic' | 'none';
+ // (undocumented)
+ sniffEndpoint?: string;
+ // (undocumented)
+ sniffInterval?: number | boolean;
+ // (undocumented)
+ sniffOnConnectionFault?: boolean;
+ // (undocumented)
+ sniffOnStart?: boolean;
+ // (undocumented)
+ ssl?: ConnectionOptions;
+ // (undocumented)
+ suggestCompression?: boolean;
+ // Warning: (ae-forgotten-export) The symbol "ElasticSearchTransportConstructor" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ Transport?: ElasticSearchTransportConstructor;
+}
+
// @public (undocumented)
export class ElasticSearchSearchEngine implements SearchEngine {
constructor(
- elasticSearchClient: Client,
+ elasticSearchClientOptions: ElasticSearchClientOptions,
aliasPostfix: string,
indexPrefix: string,
logger: Logger_2,
@@ -22,11 +107,15 @@ export class ElasticSearchSearchEngine implements SearchEngine {
// Warning: (ae-forgotten-export) The symbol "ElasticSearchOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
- static fromConfig(
- options: ElasticSearchOptions,
- ): Promise;
+ static fromConfig({
+ logger,
+ config,
+ aliasPostfix,
+ indexPrefix,
+ }: ElasticSearchOptions): Promise;
// (undocumented)
index(type: string, documents: IndexableDocument[]): Promise;
+ newClient(create: (options: ElasticSearchClientOptions) => T): T;
// (undocumented)
query(query: SearchQuery): Promise;
// Warning: (ae-forgotten-export) The symbol "ElasticSearchQueryTranslator" needs to be exported by the entry point index.d.ts
diff --git a/plugins/search-backend-module-elasticsearch/src/index.ts b/plugins/search-backend-module-elasticsearch/src/index.ts
index b4dab93b76..8cf96de858 100644
--- a/plugins/search-backend-module-elasticsearch/src/index.ts
+++ b/plugins/search-backend-module-elasticsearch/src/index.ts
@@ -21,3 +21,4 @@
*/
export { ElasticSearchSearchEngine } from './engines';
+export type { ElasticSearchClientOptions } from './engines';