[Js] Create index with replace flag (#229)

This commit is contained in:
Lei Xu
2023-06-26 18:38:20 -07:00
committed by GitHub
parent 313e66c4c5
commit c68c236f17
6 changed files with 80 additions and 19 deletions

View File

@@ -180,13 +180,6 @@ export class Table<T = number[]> {
return tableCreateVectorIndex.call(this._tbl, indexParams)
}
/**
* @deprecated Use [Table.createIndex]
*/
async create_index (indexParams: VectorIndexParams): Promise<any> {
return await this.createIndex(indexParams)
}
/**
* Returns the number of rows in this table.
*/
@@ -249,6 +242,11 @@ interface IvfPQIndexConfig {
*/
max_opq_iters?: number
/**
* Replace an existing index with the same name if it exists.
*/
replace?: boolean
type: 'ivf_pq'
}