> ## 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

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

The OCR.space plugin syncs data locally. Use `corsair.ocrspace.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>

## Conversions

Path: `ocrspace.db.conversions.search`

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

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `engine1`   | `number` | equals, gt, gte, lt, lte, in               |
| `engine2`   | `number` | equals, gt, gte, lt, lte, in               |
| `engine3`   | `number` | equals, gt, gte, lt, lte, in               |
| `total`     | `number` | equals, gt, gte, lt, lte, in               |
| `period`    | `string` | equals, contains, startsWith, endsWith, in |
| `updatedAt` | `date`   | equals, before, after, between             |

*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).*

***

## Ocr Results

Path: `ocrspace.db.ocrResults.search`

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

### Searchable filters

| Field              | Type      | Operators                                  |
| ------------------ | --------- | ------------------------------------------ |
| `entity_id`        | `string`  | equals, contains, startsWith, endsWith, in |
| `source`           | `string`  | equals, contains, startsWith, endsWith, in |
| `engine`           | `number`  | equals, gt, gte, lt, lte, in               |
| `language`         | `string`  | equals, contains, startsWith, endsWith, in |
| `text`             | `string`  | equals, contains, startsWith, endsWith, in |
| `pageCount`        | `number`  | equals, gt, gte, lt, lte, in               |
| `exitCode`         | `number`  | equals, gt, gte, lt, lte, in               |
| `isSearchablePdf`  | `boolean` | equals                                     |
| `processingTimeMs` | `number`  | equals, gt, gte, lt, lte, in               |
| `updatedAt`        | `date`    | equals, before, after, between             |

*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).*

***
