Skip to main content

Add a search index

POST 

/pipelines/:pipeline_id/search-indexers

Adds a search index to a pipeline: a vector index on VectorChord (vchord) or pgvector (pgvector) for an embedding model, the full-text index (fts) or a BM25 index (bm25) with a tokenizer. A pipeline holds one full-text index, one BM25 index for each distinct tokenizer and one vector index for each embedding model and extension.

An index added to a pipeline that holds fragments starts as building, and the workers fill the index from the stored fragment text in the background, so no document is submitted again. An index added to a pipeline without fragments is ready at once. A new vector index has a distance index for cosine. An added index does not become a default: PUT /pipelines/{pipeline_id}/search-indexers/{indexer_id}/default makes a ready index the default of its kind.

The request waits up to 10 seconds for document processing on the pipeline to pause, and returns HTTP 409 when processing does not pause in that time.

Permissions. Read and write on the pipeline. A vector index also requires read and write on the embedding model.

Add, rebuild or switch a search index shows the requests, and BM25 tokenizers lists the options of a tokenizer.

Request​

Responses​

The index was added. The body is the new index, with status set to building when the pipeline holds fragments and to ready otherwise, and is_default set to false.