pg-smart-search
API Reference

TrigramSearchEngine API

Complete API reference for the TrigramSearchEngine class, including constructors, methods, and configuration.

TrigramSearchEngine API

The main entry point for the search SDK.

Constructor

new TrigramSearchEngine(adapter: DatabaseAdapter, config: EngineConfig)

EngineConfig

Prop

Type


Methods

engine.search()

Executes a hybrid parallel search.

engine.search(params: SearchParams): Promise<SearchResults>

SearchParams

Prop

Type

engine.health()

Checks the health of the engine and its dependencies.

engine.health(): Promise<HealthStatus>

Returns an object indicating the status of the Database, Cache, and Vector Provider.

engine.metrics

Returns real-time performance metrics gathered by the engine.

engine.metrics: EngineMetrics