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

# Database

> Algolia local sync: searchable entities, `.search()` filters, and operators.

The Algolia plugin syncs data locally. Use `corsair.algolia.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Indices

Path: `algolia.db.indices.search`

```ts theme={null}
const rows = await corsair.algolia.db.indices.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field            | Type      | Operators                                  |
| ---------------- | --------- | ------------------------------------------ |
| `entity_id`      | `string`  | equals, contains, startsWith, endsWith, in |
| `name`           | `string`  | equals, contains, startsWith, endsWith, in |
| `entries`        | `number`  | equals, gt, gte, lt, lte, in               |
| `dataSize`       | `number`  | equals, gt, gte, lt, lte, in               |
| `fileSize`       | `number`  | equals, gt, gte, lt, lte, in               |
| `lastBuildTimeS` | `number`  | equals, gt, gte, lt, lte, in               |
| `createdAt`      | `string`  | equals, contains, startsWith, endsWith, in |
| `updatedAt`      | `string`  | equals, contains, startsWith, endsWith, in |
| `pendingTask`    | `boolean` | equals                                     |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Records

Path: `algolia.db.records.search`

```ts theme={null}
const rows = await corsair.algolia.db.records.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Tasks

Path: `algolia.db.tasks.search`

```ts theme={null}
const rows = await corsair.algolia.db.tasks.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `status`    | `string` | equals, contains, startsWith, endsWith, in |
| `index`     | `string` | equals, contains, startsWith, endsWith, in |
| `updatedAt` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
