Updated changeset and api-report
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
90aca31689
commit
8803c2f2df
@@ -2,4 +2,6 @@
|
||||
'@backstage/plugin-search-backend-module-pg': patch
|
||||
---
|
||||
|
||||
**DEPRECATED**: `PgSearchEngine` static `from` has been depracated and will be removed in a future release. Use static `fromConfig` method to instantiate.
|
||||
|
||||
Added support for highlighting matched terms in search result data
|
||||
|
||||
@@ -44,7 +44,7 @@ export class DatabaseDocumentStore implements DatabaseStore {
|
||||
// (undocumented)
|
||||
query(
|
||||
tx: Knex.Transaction,
|
||||
{ types, pgTerm, fields, offset, limit, options }: PgSearchQuery,
|
||||
searchQuery: PgSearchQuery,
|
||||
): Promise<DocumentResultRow[]>;
|
||||
// (undocumented)
|
||||
static supported(knex: Knex): Promise<boolean>;
|
||||
@@ -81,17 +81,18 @@ export interface DatabaseStore {
|
||||
//
|
||||
// @public (undocumented)
|
||||
export class PgSearchEngine implements SearchEngine {
|
||||
// Warning: (ae-forgotten-export) The symbol "PgSearchHighlightOptions" needs to be exported by the entry point index.d.ts
|
||||
constructor(
|
||||
databaseStore: DatabaseStore,
|
||||
highlightOptions?: PgSearchHighlightOptions,
|
||||
);
|
||||
// (undocumented)
|
||||
constructor(databaseStore: DatabaseStore, config: Config);
|
||||
// @deprecated (undocumented)
|
||||
static from(options: {
|
||||
database: PluginDatabaseManager;
|
||||
config: Config;
|
||||
}): Promise<PgSearchEngine>;
|
||||
// (undocumented)
|
||||
static fromConfig({
|
||||
config,
|
||||
database,
|
||||
}: PgSearchOptions): Promise<PgSearchEngine>;
|
||||
// (undocumented)
|
||||
getIndexer(type: string): Promise<PgSearchEngineIndexer>;
|
||||
// (undocumented)
|
||||
query(query: SearchQuery): Promise<IndexableResultSet>;
|
||||
@@ -101,12 +102,10 @@ export class PgSearchEngine implements SearchEngine {
|
||||
): void;
|
||||
// (undocumented)
|
||||
static supported(database: PluginDatabaseManager): Promise<boolean>;
|
||||
// Warning: (ae-forgotten-export) The symbol "PgSearchHighlightConfig" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
translator(
|
||||
query: SearchQuery,
|
||||
options: PgSearchHighlightConfig,
|
||||
options: PgSearchHighlightOptions,
|
||||
): ConcretePgSearchQuery;
|
||||
}
|
||||
|
||||
@@ -132,6 +131,25 @@ export type PgSearchEngineIndexerOptions = {
|
||||
databaseStore: DatabaseStore;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type PgSearchHighlightOptions = {
|
||||
useHighlight?: boolean;
|
||||
maxWords?: number;
|
||||
minWords?: number;
|
||||
shortWord?: number;
|
||||
highlightAll?: boolean;
|
||||
maxFragments?: number;
|
||||
fragmentDelimiter?: string;
|
||||
preTag: string;
|
||||
postTag: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type PgSearchOptions = {
|
||||
config: Config;
|
||||
database: PluginDatabaseManager;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "PgSearchQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
@@ -143,7 +161,7 @@ export interface PgSearchQuery {
|
||||
// (undocumented)
|
||||
offset: number;
|
||||
// (undocumented)
|
||||
options: PgSearchHighlightConfig;
|
||||
options: PgSearchHighlightOptions;
|
||||
// (undocumented)
|
||||
pgTerm?: string;
|
||||
// (undocumented)
|
||||
|
||||
@@ -22,4 +22,4 @@
|
||||
|
||||
export * from './database';
|
||||
export * from './PgSearchEngine';
|
||||
export type { PgSearchHighlightOptions } from './types';
|
||||
export type { PgSearchOptions, PgSearchHighlightOptions } from './types';
|
||||
|
||||
Reference in New Issue
Block a user