Files
lancedb/docs/web/sql/dql/contains-tokens.mdx
T
Jack YeandClaude Sonnet 5 de95ed3f6d docs: overhaul curation, feature engineering, security and deployment guides (#4748)
A broad documentation pass across the areas LanceDB Enterprise and
Embedded
diverge on most:

**Data Curation** -- GPU Function execution, Slurm scheduling (and what
Slurm is, for readers new to it), blob late materialization as its own
page, joins, aggregation/profiling, sampling, near-duplicate detection,
chunking, distributed shuffle, and IVF-partition clustering.

**Feature Engineering** -- computed columns and materialized views,
restructured to lead with the Function-based path and show the SQL form
side by side with Python throughout; a single Auto Refresh page instead
of
duplicating scheduling details on every refresh page; adaptive
execution;
checkpointing; GPU and Slurm placement for refresh workers; a Training
Cache page for the PyTorch data loader's automatic cache benefit.

**Security & Governance** -- an Audit Log reference (schema, access,
grants), Secrets promoted to an ordinary catalog object with their own
SQL
DDL and a vending/rotation guide, and privilege-table fixes verified
against the authorization source.

**Deployment & Maintenance** -- Horizontal Scaling and OpenTelemetry
moved
into a real Deployment area; Automated Cleanup folded into Intelligent
Auto-Maintenance (every other maintenance decision already lived there);
RTE Compaction and Advanced Conflict Resolution documented in depth.

**Landing page** -- the Enterprise feature comparison table reorganized
(several redundant or stale rows removed, several new areas added), and
the
"why Enterprise" bullets replaced with ones tied to a concrete page
(Performance, Scale, Fault tolerance, Multicloud deployment, Simplify
operations) instead of vague promises.

Plus a full pass addressing lancedb-gatekeeper's review: a real
test-safety
bug (a quickstart test could silently overwrite and delete a
deployment's
own `frames` table), a fabricated SQL statement with no backing
implementation, an actual dedup-guarantee bug in `take_row_ids`, and
dozens
of documentation-accuracy fixes verified against source rather than
taken
on faith -- each either fixed, or left with an explicit note on why it
needs a feature or deployment owner's sign-off instead of being guessed
at.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_018PXMCbRH6i5w47TsjeEUMT

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-03 16:17:24 -08:00

40 lines
1.5 KiB
Plaintext

---
title: "CONTAINS_TOKENS"
sidebarTitle: "CONTAINS_TOKENS"
description: "The contains_tokens() scalar function: an index-accelerated keyword predicate usable directly in WHERE."
icon: magnifying-glass
keywords: ["contains_tokens", "sql", "full text search", "keyword", "predicate", "scalar function"]
availability:
embedded: unavailable
enterprise: available
---
<CodeGroup>
```sql SQL icon="database"
SELECT * FROM my_docs WHERE contains_tokens(text, 'fox jumps dog')
```
</CodeGroup>
`contains_tokens(column, tokens)` is true when `column` contains **all** the
tokens in `tokens`, split on whitespace and punctuation. It is equivalent to
an [`fts()`](/sql/dql/fts) match query with fuzziness off, `AND` semantics
and the simple tokenizer -- reach for it when you need a keyword test in a
`WHERE` clause and have no use for a relevance score.
**Index-accelerated.** When the column has a full-text index that suits the
query, the planner uses it instead of scanning, which is the reason to prefer
it over `LIKE` or `contains` for keyword tests. See
[`EXPLAIN`](/sql/dql/explain) to confirm the plan uses the index.
## What to read next {#next}
<CardGroup cols={2}>
<Card title="Full-Text Search" icon="magnifying-glass" href="/sql/dql/fts">
The `fts()` table function, for relevance-ranked results and fuzzy,
phrase, boolean, boost and multi-match queries.
</Card>
<Card title="FTS Index" icon="bolt" href="/indexing/fts-index">
Build the full-text index this predicate accelerates against.
</Card>
</CardGroup>