mirror of
https://github.com/lancedb/lancedb.git
synced 2026-09-04 04:28:44 +00:00
feat: default create_index to create-only
This commit is contained in:
@@ -1526,11 +1526,7 @@ describe("When creating an index", () => {
|
||||
|
||||
it("should allow me to replace (or not) an existing index", async () => {
|
||||
await tbl.createIndex("id");
|
||||
// Default is replace=true
|
||||
await tbl.createIndex("id");
|
||||
await expect(tbl.createIndex("id", { replace: false })).rejects.toThrow(
|
||||
"already exists",
|
||||
);
|
||||
await expect(tbl.createIndex("id")).rejects.toThrow("already exists");
|
||||
await tbl.createIndex("id", { replace: true });
|
||||
});
|
||||
|
||||
|
||||
@@ -841,7 +841,7 @@ export interface IndexOptions {
|
||||
* and the same name, then an error will be returned. This is true even if
|
||||
* that index is out of date.
|
||||
*
|
||||
* The default is true
|
||||
* The default is false
|
||||
*/
|
||||
replace?: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user