@lancedb/lancedb 0.14.1-beta.1 → 0.14.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/indices.d.ts +9 -0
- package/dist/native.d.ts +1 -1
- package/package.json +12 -12
- package/typedoc_post_process.js +63 -0
package/dist/indices.d.ts
CHANGED
|
@@ -29,6 +29,15 @@ export interface IvfPqOptions {
|
|
|
29
29
|
* will likely result in poor performance.
|
|
30
30
|
*/
|
|
31
31
|
numSubVectors?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Number of bits per sub-vector.
|
|
34
|
+
*
|
|
35
|
+
* This value controls how much each subvector is compressed. The more bits the more
|
|
36
|
+
* accurate the index will be but the slower search. The default is 8 bits.
|
|
37
|
+
*
|
|
38
|
+
* The number of bits must be 4 or 8.
|
|
39
|
+
*/
|
|
40
|
+
numBits?: number;
|
|
32
41
|
/**
|
|
33
42
|
* Distance type to use to build the index.
|
|
34
43
|
*
|
package/dist/native.d.ts
CHANGED
|
@@ -257,7 +257,7 @@ export class Connection {
|
|
|
257
257
|
dropTable(name: string): Promise<void>
|
|
258
258
|
}
|
|
259
259
|
export class Index {
|
|
260
|
-
static ivfPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
|
|
260
|
+
static ivfPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
|
|
261
261
|
static btree(): Index
|
|
262
262
|
static bitmap(): Index
|
|
263
263
|
static labelList(): Index
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.14.1-beta.
|
|
14
|
+
"version": "0.14.1-beta.3",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -48,11 +48,10 @@
|
|
|
48
48
|
"@types/jest": "^29.1.2",
|
|
49
49
|
"@types/node": "^22.7.4",
|
|
50
50
|
"@types/tmp": "^0.2.6",
|
|
51
|
-
"apache-arrow-13": "npm:apache-arrow@13.0.0",
|
|
52
|
-
"apache-arrow-14": "npm:apache-arrow@14.0.0",
|
|
53
51
|
"apache-arrow-15": "npm:apache-arrow@15.0.0",
|
|
54
52
|
"apache-arrow-16": "npm:apache-arrow@16.0.0",
|
|
55
53
|
"apache-arrow-17": "npm:apache-arrow@17.0.0",
|
|
54
|
+
"apache-arrow-18": "npm:apache-arrow@18.0.0",
|
|
56
55
|
"eslint": "^8.57.0",
|
|
57
56
|
"jest": "^29.7.0",
|
|
58
57
|
"shx": "^0.3.4",
|
|
@@ -86,6 +85,7 @@
|
|
|
86
85
|
"build-release": "npm run build:release && tsc -b && shx cp lancedb/native.d.ts dist/native.d.ts",
|
|
87
86
|
"lint-ci": "biome ci .",
|
|
88
87
|
"docs": "typedoc --plugin typedoc-plugin-markdown --out ../docs/src/js lancedb/index.ts",
|
|
88
|
+
"postdocs": "node typedoc_post_process.js",
|
|
89
89
|
"lint": "biome check . && biome format .",
|
|
90
90
|
"lint-fix": "biome check --write . && biome format --write .",
|
|
91
91
|
"prepublishOnly": "napi prepublish -t npm",
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
"reflect-metadata": "^0.2.2"
|
|
99
99
|
},
|
|
100
100
|
"optionalDependencies": {
|
|
101
|
-
"@lancedb/lancedb-darwin-x64": "0.14.1-beta.
|
|
102
|
-
"@lancedb/lancedb-darwin-arm64": "0.14.1-beta.
|
|
103
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.14.1-beta.
|
|
104
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.14.1-beta.
|
|
105
|
-
"@lancedb/lancedb-linux-x64-musl": "0.14.1-beta.
|
|
106
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.14.1-beta.
|
|
107
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.14.1-beta.
|
|
108
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.14.1-beta.
|
|
101
|
+
"@lancedb/lancedb-darwin-x64": "0.14.1-beta.3",
|
|
102
|
+
"@lancedb/lancedb-darwin-arm64": "0.14.1-beta.3",
|
|
103
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.14.1-beta.3",
|
|
104
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.14.1-beta.3",
|
|
105
|
+
"@lancedb/lancedb-linux-x64-musl": "0.14.1-beta.3",
|
|
106
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.14.1-beta.3",
|
|
107
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.14.1-beta.3",
|
|
108
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.14.1-beta.3"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"apache-arrow": ">=
|
|
111
|
+
"apache-arrow": ">=15.0.0 <=18.1.0"
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
|
|
4
|
+
// Read all files in the directory
|
|
5
|
+
function processDirectory(directoryPath) {
|
|
6
|
+
fs.readdir(directoryPath, { withFileTypes: true }, (err, files) => {
|
|
7
|
+
if (err) {
|
|
8
|
+
return console.error("Unable to scan directory: " + err);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
files.forEach((file) => {
|
|
12
|
+
const filePath = path.join(directoryPath, file.name);
|
|
13
|
+
|
|
14
|
+
if (file.isDirectory()) {
|
|
15
|
+
// Recursively process subdirectory
|
|
16
|
+
processDirectory(filePath);
|
|
17
|
+
} else if (file.isFile()) {
|
|
18
|
+
// Read each file
|
|
19
|
+
fs.readFile(filePath, "utf8", (err, data) => {
|
|
20
|
+
if (err) {
|
|
21
|
+
return console.error("Unable to read file: " + err);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Process the file content
|
|
25
|
+
const processedData = processContents(data);
|
|
26
|
+
|
|
27
|
+
// Write the processed content back to the file
|
|
28
|
+
fs.writeFile(filePath, processedData, "utf8", (err) => {
|
|
29
|
+
if (err) {
|
|
30
|
+
return console.error("Unable to write file: " + err);
|
|
31
|
+
}
|
|
32
|
+
console.log(`Processed file: ${filePath}`);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function processContents(contents) {
|
|
41
|
+
// This changes the parameters section to put the parameter description on
|
|
42
|
+
// the same line as the bullet with the parameter name and type.
|
|
43
|
+
return contents.replace(/(## Parameters[\s\S]*?)(?=##|$)/g, (match) => {
|
|
44
|
+
let lines = match
|
|
45
|
+
.split("\n")
|
|
46
|
+
.map((line) => line.trim())
|
|
47
|
+
|
|
48
|
+
.filter((line) => line !== "")
|
|
49
|
+
.map((line) => {
|
|
50
|
+
if (line.startsWith("##")) {
|
|
51
|
+
return line;
|
|
52
|
+
} else if (line.startsWith("•")) {
|
|
53
|
+
return "\n*" + line.substring(1);
|
|
54
|
+
} else {
|
|
55
|
+
return " " + line;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return lines.join("\n") + "\n\n";
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Start processing from the root directory
|
|
63
|
+
processDirectory("../docs/src/js");
|