Skip to main content

Add a distance index

POST 

/pipelines/:pipeline_id/search-indexers/:indexer_id/distance-indexes

Adds a distance index for cosine, euclidean-distance or dot-product to a vector index, so that searches can use that distance strategy. The database builds the index in the background with a concurrent build, so searches and document processing continue. The response returns as soon as the build starts: the new entry of the distance index list shows valid set to false until the build completes, and the rebuild field of the search index reports the progress. The max-inner-product strategy cannot be indexed.

Permissions. Write on the pipeline.

Distance index shows the requests.

Request​

Responses​

The build started. The body holds the identifier of the search index, the distance strategy and the name of the database index under construction.