changeset and api report updates

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-06-10 10:08:48 +02:00
parent 1b59892019
commit 535847cf14
5 changed files with 29 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-backend-module-elasticsearch': patch
---
Now possible to set a custom index template on the elasticsearch search engine.
@@ -137,6 +137,18 @@ export interface ElasticSearchConnectionConstructor {
};
}
// @public
export type ElasticSearchCustomIndexTemplate = {
name: string;
body: ElasticSearchCustomIndexTemplateBody;
};
// @public
export type ElasticSearchCustomIndexTemplateBody = {
index_patterns: string[];
template: Record<string, any>;
};
// @public (undocumented)
export type ElasticSearchHighlightConfig = {
fragmentDelimiter: string;
@@ -211,10 +223,14 @@ export class ElasticSearchSearchEngine implements SearchEngine {
}: ElasticSearchOptions): Promise<ElasticSearchSearchEngine>;
// (undocumented)
getIndexer(type: string): Promise<ElasticSearchSearchEngineIndexer>;
// (undocumented)
protected indexTemplate?: ElasticSearchCustomIndexTemplate;
newClient<T>(create: (options: ElasticSearchClientOptions) => T): T;
// (undocumented)
query(query: SearchQuery): Promise<IndexableResultSet>;
// (undocumented)
setIndexTemplate(template: ElasticSearchCustomIndexTemplate): void;
// (undocumented)
setTranslator(translator: ElasticSearchQueryTranslator): void;
// (undocumented)
protected translator(
@@ -42,15 +42,17 @@ export type { ElasticSearchClientOptions };
*/
export type ElasticSearchCustomIndexTemplate = {
name: string;
body: ElasticSearchIndexTemplateBody;
body: ElasticSearchCustomIndexTemplateBody;
};
/**
* Elasticsearch specific index template body
* @public
*/
export type ElasticSearchIndexTemplateBody = {
export type ElasticSearchCustomIndexTemplateBody = {
index_patterns: string[];
// See available properties of template
// https://www.elastic.co/guide/en/elasticsearch/reference/7.15/indices-put-template.html#put-index-template-api-request-body
template: Record<string, any>;
};
@@ -30,6 +30,8 @@ export type {
ElasticSearchQueryTranslator,
ElasticSearchQueryTranslatorOptions,
ElasticSearchOptions,
ElasticSearchCustomIndexTemplate,
ElasticSearchCustomIndexTemplateBody,
} from './ElasticSearchSearchEngine';
export type {
ElasticSearchSearchEngineIndexer,
@@ -36,4 +36,6 @@ export type {
ElasticSearchAuth,
ElasticSearchSearchEngineIndexer,
ElasticSearchSearchEngineIndexerOptions,
ElasticSearchCustomIndexTemplate,
ElasticSearchCustomIndexTemplateBody,
} from './engines';