mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-12 23:02:28 +00:00
OSS docs now own the full usage content for features that only run against an Enterprise deployment, since the client interface itself lives here; Enterprise docs keep only the parts specific to its own behavior. Sophon's overlay for these five pages is dropped since the OSS versions are now the complete reference. SQL Reference is restructured to match an object-type SQL manual (DDL by object, then DML, then DQL, then Expressions) instead of the old flat, loosely-ordered page list, absorbing the SQL client-connection guide and FTS-via-SQL examples into it.
50 lines
1.3 KiB
Plaintext
50 lines
1.3 KiB
Plaintext
---
|
|
title: "Index"
|
|
sidebarTitle: "Index"
|
|
description: "CREATE INDEX and DROP INDEX — one column, server-chosen name."
|
|
icon: bolt
|
|
keywords: ["create index", "drop index", "sql"]
|
|
---
|
|
|
|
<Badge color="red">Enterprise</Badge> [SQL runs on a deployment.](/sql)
|
|
|
|
## CREATE INDEX {#create}
|
|
|
|
```sql
|
|
CREATE INDEX ON documents (title)
|
|
```
|
|
|
|
<Note>
|
|
SQL `CREATE INDEX` covers **one column** and takes **no user-chosen name** --
|
|
the server names it. For a multi-column or explicitly-named index, or to
|
|
choose the algorithm, use the SDK's
|
|
[`create_index`](/indexing#choosing-an-index).
|
|
</Note>
|
|
|
|
<Note>
|
|
**Enterprise job type:** `create_ivf_pq`, `create_btree`, `create_fts`, and one
|
|
more per algorithm -- the type names which algorithm is building, not a
|
|
different feature. See [Build & Repair](/indexing/reindexing).
|
|
</Note>
|
|
|
|
## DROP INDEX {#drop}
|
|
|
|
```sql
|
|
DROP INDEX documents.title_idx
|
|
```
|
|
|
|
Takes the qualified `table.index` name. Find it with the SDK's
|
|
[`list_indices`](/indexing#choosing-an-index) if you created the index without
|
|
naming it yourself.
|
|
|
|
## What to read next {#next}
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Indexing" icon="bolt" href="/indexing">
|
|
Choosing an index type from the SDK.
|
|
</Card>
|
|
<Card title="Build & Repair" icon="refresh" href="/indexing/reindexing">
|
|
Keeping an index current as data arrives.
|
|
</Card>
|
|
</CardGroup>
|