POST
/
v1
/
table
/
{name}
/
create_index
curl --request POST \
  --url https://{db}.{region}.api.lancedb.com/v1/table/{name}/create_index/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "index_type": "IVF_PQ",
  "column": "vector",
  "distance_type": "L2",
  "with_position": true,
  "base_tokenizer": "simple",
  "language": "English",
  "max_token_length": 40,
  "lower_case": false,
  "stem": false,
  "remove_stop_words": false,
  "ascii_folding": false
}'
{}

Authorizations

x-api-key
string
header
required

Path Parameters

name
string
required

name of the table

Body

application/json
index_type
enum<string>
required

type of index to create

Available options:
IVF_PQ,
IVF_HNSW_SQ,
BTREE,
BITMAP,
LABEL_LIST,
FTS
column
string

The targeted vector column to index. Required only if there are multiple vector columns.

distance_type
enum<string>

distance metric to use for search

Available options:
L2,
Cosine,
Dot
with_position
boolean
default:
true

Whether to store the position of tokens in docs, required for phrase search.

base_tokenizer
string
default:
simple

The base tokenizer to use for full text search.

language
string
default:
English

The language to use for stemming and stop words.

max_token_length
integer
default:
40

The maximum token length to index, longer tokens are ignored.

lower_case
boolean
default:
false

Whether to convert tokens to lowercase.

stem
boolean
default:
false

Whether to apply stemming to tokens.

remove_stop_words
boolean
default:
false

Whether to remove stop words from tokens.

ascii_folding
boolean
default:
false

Whether to convert non-ASCII characters to ASCII, used for accent folding.

Response

200
application/json
Vector index is created successfully

The response is of type object.