The full-text search allows you to incorporate keyword-based search (based on BM25) in your retrieval solutions. LanceDB can deliver 26ms query latency for full-text search. Our benchmark tests have more details.

import lancedb

# connect to LanceDB
db = lancedb.connect(
  uri="db://your-project-slug",
  api_key="your-api-key",
  region="us-east-1"
)

# let's use the table created from quickstart
table_name = "lancedb-cloud-quickstart"
table = db.open_table(table_name)

table.create_fts_index("text")
# Wait for FTS index to be ready
fts_index_name = f"{text_column}_idx"
wait_for_index(table, fts_index_name)

query_text = "football"
fts_results = table.search(query_text, query_type="fts").select(["text", "keywords", "label"]).limit(5).to_pandas()

Newly added or modified records become searchable immediately. The full-text search (FTS) index updates automatically in the background, ensuring continuous search availability without blocking queries.