> For the complete documentation index, see [llms.txt](https://db.coolstone.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://db.coolstone.dev/4/advanced/indexing.md).

# Indexing

## In Memory

{% hint style="info" %}
This takes precedence over in storage indexes.&#x20;
{% endhint %}

{% code lineNumbers="true" %}

```javascript
await db.buildIndex(limit)
```

{% endcode %}

## In Storage

{% code lineNumbers="true" %}

```javascript
await db.buildPersistentIndex()
```

{% endcode %}
