Skip to main content
POST
/
v1
/
table
/
{name}
/
create_index
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

Body

application/json
index_type
enum<string>
required
Available options:
IVF_PQ,
IVF_HNSW_SQ,
BTREE,
BITMAP,
LABEL_LIST,
FTS
column
string
Example:
distance_type
enum<string>
Available options:
L2,
Cosine,
Dot
with_position
boolean
default:true
base_tokenizer
enum<string>
default:simple
Available options:
simple,
whitespace,
unicode
language
string
default:English
max_token_length
integer
default:40
Required range: 1 <= x <= 100
lower_case
boolean
default:false
stem
boolean
default:false
remove_stop_words
boolean
default:false
ascii_folding
boolean
default:false

Response