# getSearchEngine



# Overview

Loads and caches a `SearchEngine` instance from a `SearchIndexStore`. This is used by [DefaultChatRuntime](/docs/api-reference/server/default-chat-runtime) when no `searchEngine` is provided.

## Type Definition

```ts
import type { SearchEngine, SearchIndexStore } from '@peam-ai/search';

export declare function getSearchEngine(store: SearchIndexStore): Promise<SearchEngine | undefined>;
```

## Notes

* Returns `undefined` if the index is missing or empty.
* Caches the `SearchEngine` instance in memory.


## Sitemap
[Overview of all docs pages](/sitemap.md)
