@lde/search-indexer 0.30.3 → 0.31.0
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/composition.d.ts.map +1 -1
- package/dist/composition.js +6 -0
- package/dist/config.d.ts +9 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../src/composition.ts"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,YAAY,EAEb,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe,CAiB1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,aAAa,GACpB,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,KAAK,MAAM,CAAC,cAAc,CAAC,CAmBxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,oBAAoB,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAC3D,oBAAoB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../src/composition.ts"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,YAAY,EAEb,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe,CAiB1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,aAAa,GACpB,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,KAAK,MAAM,CAAC,cAAc,CAAC,CAmBxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,oBAAoB,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAC3D,oBAAoB,GAAG,SAAS,CA0ClC"}
|
package/dist/composition.js
CHANGED
|
@@ -69,11 +69,15 @@ export function distributionResolverFrom(config, replaceJsonLdContext) {
|
|
|
69
69
|
if (!config.qlever) {
|
|
70
70
|
return undefined;
|
|
71
71
|
}
|
|
72
|
+
const serverOptions = config.qlever.memoryMaxSize === undefined
|
|
73
|
+
? undefined
|
|
74
|
+
: { 'memory-max-size': config.qlever.memoryMaxSize };
|
|
72
75
|
const { importer, server } = config.qlever.mode === 'remote'
|
|
73
76
|
? createQlever({
|
|
74
77
|
mode: 'remote',
|
|
75
78
|
dataDir: config.qlever.dataDir,
|
|
76
79
|
replaceJsonLdContext,
|
|
80
|
+
serverOptions,
|
|
77
81
|
})
|
|
78
82
|
: config.qlever.network
|
|
79
83
|
? createQlever({
|
|
@@ -87,12 +91,14 @@ export function distributionResolverFrom(config, replaceJsonLdContext) {
|
|
|
87
91
|
// one indexer per network.
|
|
88
92
|
containerName: `qlever-${config.qlever.network}`,
|
|
89
93
|
replaceJsonLdContext,
|
|
94
|
+
serverOptions,
|
|
90
95
|
})
|
|
91
96
|
: createQlever({
|
|
92
97
|
mode: 'docker',
|
|
93
98
|
image: config.qlever.image,
|
|
94
99
|
dataDir: config.qlever.dataDir,
|
|
95
100
|
replaceJsonLdContext,
|
|
101
|
+
serverOptions,
|
|
96
102
|
});
|
|
97
103
|
return new ImportResolver(new SparqlDistributionResolver(), {
|
|
98
104
|
importer,
|
package/dist/config.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface IndexerConfig {
|
|
|
48
48
|
* (`PROVENANCE_FILE` + `PIPELINE_VERSION`). */
|
|
49
49
|
readonly provenance?: ProvenanceConfig;
|
|
50
50
|
/** The QLever import path (`QLEVER_MODE` + `QLEVER_IMAGE` +
|
|
51
|
-
* `IMPORT_STRATEGY` + `DATA_DIR`): import data dumps into a
|
|
51
|
+
* `IMPORT_STRATEGY` + `DATA_DIR` + `QLEVER_MEMORY_MAX_SIZE`): import data dumps into a
|
|
52
52
|
* pipeline-controlled QLever instead of relying on live SPARQL endpoints
|
|
53
53
|
* alone. */
|
|
54
54
|
readonly qlever?: QleverConfig;
|
|
@@ -78,6 +78,14 @@ export type QleverConfig = {
|
|
|
78
78
|
readonly strategy: 'sparql' | 'sparqlWithImportFallback' | 'import';
|
|
79
79
|
/** Directory for downloaded dumps and QLever index caches. */
|
|
80
80
|
readonly dataDir: string;
|
|
81
|
+
/**
|
|
82
|
+
* The memory QLever may reserve for answering queries
|
|
83
|
+
* (`QLEVER_MEMORY_MAX_SIZE`, QLever’s `--memory-max-size`), e.g. `8G`.
|
|
84
|
+
* QLever refuses a query that would exceed it, with an HTTP 500 such as
|
|
85
|
+
* “Tried to allocate 8 MB, but only 5.8 MB were available”. Unset, the
|
|
86
|
+
* `@lde/sparql-qlever` default applies.
|
|
87
|
+
*/
|
|
88
|
+
readonly memoryMaxSize?: string;
|
|
81
89
|
} & ({
|
|
82
90
|
/** A sibling container the indexer starts over the Docker socket. */
|
|
83
91
|
readonly mode: 'docker';
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;;2CAEuC;IACvC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;eAEW;IACX,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC;IACzC;;2DAEuD;IACvD,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC;wEACoE;IACpE,QAAQ,CAAC,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;IAChD;wEACoE;IACpE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;oDACgD;IAChD,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IACvC;;;iBAGa;IACb,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM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ileURLToPath } from 'node:url';
|
|
4
4
|
const QLEVER_MODES = ['docker', 'remote'];
|
|
5
|
+
/** A size QLever’s `--memory-max-size` reads: a number and a unit, such as
|
|
6
|
+
* `8G`, `8 GB` or `512M`. */
|
|
7
|
+
const MEMORY_SIZE = /^\d+(\.\d+)?\s?[kmgt]b?$/i;
|
|
5
8
|
const IMPORT_STRATEGIES = [
|
|
6
9
|
'sparql',
|
|
7
10
|
'sparqlWithImportFallback',
|
|
@@ -193,6 +196,7 @@ function qleverFromEnvironment(environment, problems) {
|
|
|
193
196
|
const image = environment['QLEVER_IMAGE'];
|
|
194
197
|
const strategy = environment['IMPORT_STRATEGY'];
|
|
195
198
|
const network = environment['QLEVER_NETWORK'];
|
|
199
|
+
const memoryMaxSize = environment['QLEVER_MEMORY_MAX_SIZE'];
|
|
196
200
|
// QLEVER_IMAGE alone is how the Docker mode has always been enabled. An
|
|
197
201
|
// empty QLEVER_MODE, as a template renders an unset one, counts as unset.
|
|
198
202
|
const mode = environment['QLEVER_MODE'] || (image ? 'docker' : undefined);
|
|
@@ -203,6 +207,9 @@ function qleverFromEnvironment(environment, problems) {
|
|
|
203
207
|
if (network) {
|
|
204
208
|
problems.push('QLEVER_NETWORK requires QLEVER_IMAGE: without an import engine there is no QLever container to attach');
|
|
205
209
|
}
|
|
210
|
+
if (memoryMaxSize) {
|
|
211
|
+
problems.push('QLEVER_MEMORY_MAX_SIZE requires QLEVER_IMAGE or QLEVER_MODE=remote: without an import engine there is no QLever to size');
|
|
212
|
+
}
|
|
206
213
|
return undefined;
|
|
207
214
|
}
|
|
208
215
|
if (!QLEVER_MODES.includes(mode)) {
|
|
@@ -213,9 +220,13 @@ function qleverFromEnvironment(environment, problems) {
|
|
|
213
220
|
!IMPORT_STRATEGIES.includes(strategy)) {
|
|
214
221
|
problems.push(`IMPORT_STRATEGY must be one of ${IMPORT_STRATEGIES.map((name) => `“${name}”`).join(', ')}, got “${strategy}”`);
|
|
215
222
|
}
|
|
223
|
+
if (memoryMaxSize && !MEMORY_SIZE.test(memoryMaxSize)) {
|
|
224
|
+
problems.push(`QLEVER_MEMORY_MAX_SIZE must be a size such as “8G” or “8 GB”, got “${memoryMaxSize}”`);
|
|
225
|
+
}
|
|
216
226
|
const common = {
|
|
217
227
|
strategy: (strategy ?? 'sparql'),
|
|
218
228
|
dataDir: environment['DATA_DIR'] ?? '/data',
|
|
229
|
+
...(memoryMaxSize ? { memoryMaxSize } : {}),
|
|
219
230
|
};
|
|
220
231
|
if (mode === 'remote') {
|
|
221
232
|
if (image) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/search-indexer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "The @lde/search-pipeline indexer as a bootable process and prebuilt Docker image: loads a mounted schema-declaration module, dataset selection, Typesense connection and rebuild mode from the environment, then runs the object-grain searchIndexerPipeline once to completion. The composition layer that binds the engine-agnostic @lde/search-pipeline stages to @lde/search-typesense – the write-path counterpart of @lde/search-api-server.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/ldelements/lde.git",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@lde/dataset": "^0.10.0",
|
|
32
32
|
"@lde/dataset-registry-client": "^0.12.0",
|
|
33
|
-
"@lde/pipeline": "^0.
|
|
34
|
-
"@lde/pipeline-console-reporter": "^0.
|
|
33
|
+
"@lde/pipeline": "^0.42.0",
|
|
34
|
+
"@lde/pipeline-console-reporter": "^0.33.0",
|
|
35
35
|
"@lde/search": "^0.36.3",
|
|
36
|
-
"@lde/search-pipeline": "^0.
|
|
37
|
-
"@lde/search-typesense": "^0.
|
|
38
|
-
"@lde/sparql-qlever": "^0.
|
|
36
|
+
"@lde/search-pipeline": "^0.41.0",
|
|
37
|
+
"@lde/search-typesense": "^0.44.0",
|
|
38
|
+
"@lde/sparql-qlever": "^0.21.0",
|
|
39
39
|
"commander": "^15.0.0",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
41
|
"typesense": "^3.1.1"
|