> ## Documentation Index
> Fetch the complete documentation index at: https://voyant.travel/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> A Typesense-compatible search proxy with per-tenant isolation and scoped keys, driven by the official Typesense client.

Voyant's search service is a Typesense-compatible proxy. Rather than ship a hand-rolled search API, the Cloud SDK gives you a config object for the official [`typesense`](https://typesense.org) client. The proxy transparently handles tenant isolation, scoped Typesense keys, and collection name rewriting, so you get the full Typesense client surface with Voyant authentication.

## Setup

Install both the Cloud SDK and the official Typesense client:

```bash theme={null}
pnpm add @voyant-travel/cloud-sdk typesense
```

Create a client config from the SDK and pass it straight to Typesense:

```ts theme={null}
import { createSearchClientConfig } from "@voyant-travel/cloud-sdk";
import Typesense from "typesense";

const search = new Typesense.Client(
  createSearchClientConfig({ apiKey: process.env.VOYANT_API_KEY! }),
);
```

## How it works

* **Authentication** uses your Voyant API token as a bearer token, the same token as the rest of Cloud.
* **Isolation** is handled by the proxy. You do not manage Typesense API keys directly; the proxy mints scoped keys and rewrites collection names per tenant.
* **The client surface** is plain Typesense. Search, multi-search, and document operations all work as documented by Typesense, because you are using the real client.

```ts theme={null}
const results = await search
  .collections("products")
  .documents()
  .search({ q: "athens day tour", query_by: "name,description" });
```

<Note>
  Because you drive the official Typesense client, refer to the Typesense documentation for query syntax, ranking, and indexing. Voyant only supplies authenticated, isolated transport through `createSearchClientConfig`.
</Note>
