Skip to main content
GET
/
v1
/
table
/
{name}
/
index
/
{index_name}
/
stats
Get Index Details
curl --request GET \
  --url https://{db}.{region}.api.lancedb.com/v1/table/{name}/index/{index_name}/stats \
  --header 'x-api-key: <api-key>'
{
  "num_indexed_rows": 100000,
  "num_unindexed_rows": 123,
  "index_type": "IVF_PQ",
  "distance_type": "L2"
}

Authorizations

x-api-key
string
header
required

Path Parameters

name
string
required

name of the table

index_name
string
required

name of the index

Response

Index details of an index.

num_indexed_rows
integer
Example:

100000

num_unindexed_rows
integer
index_type
enum<string>

Type of index to create for optimizing search performance.

Vector Indexes:

  • IVF_PQ: Default vector index using Inverted File with Product Quantization. Optimized for high-dimensional vectors with excellent compression.
  • IVF_HNSW_SQ: Combines IVF clustering with HNSW graph and Scalar Quantization for improved search quality and speed.

Scalar Indexes:

  • BTREE: B-tree index for efficient range queries and equality comparisons on scalar data.
  • BITMAP: Bitmap index for high-cardinality categorical data with fast boolean operations.
  • LABEL_LIST: Optimized for label-based filtering and categorical data with limited unique values.

Full-Text Search:

  • FTS: Full-text search index using BM25 algorithm for keyword-based search on text columns.
Available options:
IVF_PQ,
IVF_HNSW_SQ,
BTREE,
BITMAP,
LABEL_LIST,
FTS
distance_type
enum<string>

Distance metric to use for vector similarity search. The choice of metric significantly impacts search accuracy and performance.

  • L2 (Euclidean): Default metric, measures straight-line distance between vectors. Best for general-purpose similarity search.
  • Cosine: Measures the cosine of the angle between vectors (0-1 range). Best for normalized embeddings and semantic similarity.
  • Dot: Raw dot product without normalization. Sensitive to vector magnitudes, useful for raw similarity scores.
  • Hamming: Counts differing bit positions in binary vectors. Only for binary vectors stored as packed uint8 arrays.

Important: Use the same distance metric that your embedding model was trained with. Most modern embedding models use cosine similarity.

Available options:
L2,
Cosine,
Dot