Backstage
    Preparing search index...

    Interface that must be implemented by specific search engines, responsible for performing indexing and querying and translating abstract queries into concrete, search engine-specific queries.

    Implements

    Index

    Constructors

    Methods

    • Create a custom search client from the derived search client configuration. This need not be the same client that the engine uses internally.

      Type Parameters

      • T

      Parameters

      Returns T

      import { isOpenSearchCompatible } from '@backstage/plugin-search-backend-module-elasticsearch';
      import { Client } from '@elastic/elasticsearch';

      const client = searchEngine.newClient<Client>(options => {
      // This type guard ensures options are compatible with either OpenSearch
      // or Elasticsearch client constructors.
      if (!isOpenSearchCompatible(options)) {
      return new Client(options);
      }
      throw new Error('Incompatible options provided');
      });