The short version

On 19 November 2026, Google's BigQuery release notes added a CREATE AI INDEX statement. Once you've built one of these indexes on a table, the AI.SEARCH function can search its text columns from a plain-English query. BigQuery creates the embeddings, picks the indexing strategy and keeps the index up to date. An embedding is a vector of numbers that captures what a passage means, so two passages that say the same thing in different words end up close together. Search on embeddings finds rows by meaning, which keyword search can't do.

The feature is in Preview and falls under Google's Pre-GA Offerings Terms. That means it's provided as is and support may be limited. Two days earlier, on 17 November, Google made the rerank option of AI.SEARCH generally available. Reranking takes the first batch of matches and sorts them again by how well each one answers the query.

Why this matters for builders

Until now, semantic search inside BigQuery took a fair bit of plumbing. You picked an embedding model, ran it over every row, wrote the vectors into a column, built a vector index on top and then kept all of it in step as data changed. AI indexes take over that whole chain. Google's overview calls them managed and self-optimising: BigQuery handles column selection, tuning and ongoing maintenance.

If your support tickets, product catalogue, policy library or survey comments already live in BigQuery, you can now put a search box or a RAG retrieval step over them with a couple of SQL statements. RAG (retrieval-augmented generation) means fetching relevant rows and passing them to a language model before it answers. For teams that only need retrieval over warehouse text, a separate vector database may no longer be worth running.

Before you start: roles, tables and columns

Permissions come first. To create or drop an index, you need BigQuery Data Owner (roles/bigquery.dataOwner) on the project. People who only query need BigQuery Data Viewer and BigQuery Job User. Data Viewer also lets someone read the index metadata.

Only standard tables work. You can't index views, materialised views, external tables, BigLake tables, Apache Iceberg tables or table snapshots. Datasets with cross-region replicas can't hold AI indexes at all.

Column rules are strict too:

  • You can only index top-level STRING columns that aren't repeated.
  • ARRAY<STRING>, STRUCT, JSON, ObjectRef, nested fields, pseudocolumns and any non-string type are excluded.
  • One index can cover 50 columns at most.
  • A table gets one AI index, and that table can't also carry a vector index or an auto-generated embedding column.

Size matters. On an on-demand project, CREATE AI INDEX accepts tables of up to 1,000,000 rows. If you assign the project to a BACKGROUND reservation, the ceiling rises to 100,000,000 rows. Google recommends that reservation for larger production workloads anyway, and it has to sit in the table's region.

A worked example

We'll follow Google's own example: a products table in a dataset called mydataset. The fastest route lets BigQuery choose the columns. It scans the schema and takes up to 50 eligible text columns:

CREATE AI INDEX products_ai_index
ON mydataset.products(AUTO COLUMNS);

We'd only use that for quick experiments. AUTO COLUMNS grabs every top-level string column and won't filter out UUIDs, hashes or other noise. Columns you add to the table later won't join the index either. Naming the columns gives you control, and order matters, because Google advises putting the most informative column (a title or product name, say) first:

CREATE AI INDEX products_ai_index
ON mydataset.products(name, description);

The index lives in the same project and dataset as its table, so you don't qualify its name. Building happens in background jobs, and until they finish, searches only see rows that have been processed. Watch progress in the dataset's INFORMATION_SCHEMA.AI_INDEXES view:

SELECT table_name, index_name, creation_time,
       coverage_percentage, unindexed_row_count, total_logical_bytes
FROM my_project.my_dataset.INFORMATION_SCHEMA.AI_INDEXES;

If you went with AUTO COLUMNS, the INFORMATION_SCHEMA.AI_INDEX_COLUMNS view tells you what BigQuery chose. When coverage is complete, a search only needs the table and the query text. Leave out the column argument and every indexed column gets searched:

SELECT base.id, base.name, base.description, distance
FROM AI.SEARCH(
  TABLE mydataset.products,
  'shoes that keep your feet dry in the rain',
  top_k => 5)
ORDER BY distance;

Each result comes back with a base struct holding the row's columns and a distance value showing how far that row sits from the query. If you don't set top_k, you get 10 rows. A negative value returns everything.

Filtering and reranking

Meaning-based search is weak at hard constraints like "under $100" or "in stock". The fix is to swap the table name for a pre-filter query that narrows the rows first. That query can use SELECT, FROM and WHERE and nothing else, and the reference warns that subqueries can interfere with index use.

Setting rerank => TRUE adds a rerank_score from 0 to 1 and orders results by it, highest first. There's some setup behind it. The project running the query needs the Discovery Engine API (discoveryengine.googleapis.com) switched on, and the person running it needs discoveryengine.rankingConfigs.rank, which comes with roles/discoveryengine.viewer. Calls go out under the end user's own credentials and draw on the project's Agent Search ranking API quota. Very long text gets cut at the ranking model's token limit.

Rerank scores only make sense within a single result set. A cut-off like 0.5 might suit one query and fail on the next, so Google suggests capping results with top_k and skipping score thresholds.

Costs

Running CREATE AI INDEX or DROP AI INDEX costs nothing. The charges come from elsewhere:

  • Background processing. The jobs that build and maintain the index have IDs starting with gc_. They're billed at on-demand DML rates by default, or as slot time on your BACKGROUND reservation if you have one.
  • Embeddings. You pay the underlying model's published rate, for indexed rows and for every query's text. Google doesn't name the model and says it may change it.
  • Storage. You're charged while the index exists. total_logical_bytes shows the size.
  • Search. AI.SEARCH runs at standard BigQuery compute pricing. Reranking is billed separately under ranking API pricing.

Since the docs don't name the model, nobody can price a large index on paper. We'd index a small sample first, then query INFORMATION_SCHEMA.JOBS in that region for gc_ jobs and read total_slot_ms and total_bytes_billed. That gives you real figures to scale from.

Limits to check before production

  • When the indexed columns hold a lot of text, it's truncated and only part gets searched.
  • Exact lookups on IDs, UUIDs, hashes or system codes aren't supported.
  • Raw logs, stack traces, URLs and machine-generated strings can drag quality down.
  • You can't use CREATE OR REPLACE AI INDEX or ALTER AI INDEX. To change columns, run DROP AI INDEX IF EXISTS products_ai_index ON mydataset.products; and create the index again.
  • While an index exists, you can't copy (including across regions), clone, snapshot, rename or restore the table, or use CREATE TABLE ... LIKE. Backup and deployment scripts will need to drop the index first.
  • You can't drop, rename or retype a column that's in the index.

The SUM(info) newsletter of 24 November also highlighted the one-index-per-table rule and the reservation-dependent row limits as things to review early.

Notes for New Zealand teams

The AI.SEARCH reference says the function runs wherever Google's Gemini Enterprise Agent Platform embedding models are offered, plus the US and EU multi-regions. We couldn't find a region list for AI indexes themselves. If your data has to stay in a nearby region for privacy or contractual reasons, try a test index there before you design around it. Queries are embedded by a Google-managed model whose identity isn't published, so check that against your data handling commitments. If you have to report exactly which model touched your data, Google's own advice is to stay with generated embeddings and CREATE VECTOR INDEX, which also let you set custom index options.

If you build something with AI indexes, share it with other members on the ASAI projects page.

Sources

Build with people working on the same things

Join the Auckland Society for AI: NZ$599 a year with a ForgeBox and the members' projects area. Our Auckland meetups are open to everyone.

Become a member