OptionalbatchKeyField: stringOptionalhighlightOptions: ElasticSearchHighlightOptionsOptionalqueryOptions: ElasticSearchQueryConfigFactory method for getting a search engine indexer for a given document type.
The type or name of the document set for which an indexer
should be retrieved. This corresponds to the type property on the
document collator/decorator factories and will most often be used to
identify an index or group to which documents should be written.
Create a custom search client from the derived search client configuration. This need not be the same client that the engine uses internally.
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');
});
Perform a search query against the SearchEngine.
Override the default translator provided by the SearchEngine.
ProtectedtranslatorOptionaloptions: ElasticSearchQueryTranslatorOptionsStaticfrom
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.