@lde/search-pipeline 0.9.0 → 0.10.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/search-index-writer.d.ts +7 -6
- package/dist/search-index-writer.d.ts.map +1 -1
- package/dist/search-stages.d.ts +7 -6
- package/dist/search-stages.d.ts.map +1 -1
- package/dist/search-stages.js +1 -1
- package/dist/typed-search-document.d.ts +3 -3
- package/dist/typed-search-document.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { type Writer } from '@lde/pipeline';
|
|
2
|
-
import type { SearchDocument, SearchSchema
|
|
2
|
+
import type { RootType, SearchDocument, SearchSchema } from '@lde/search';
|
|
3
3
|
import type { TypedSearchDocument } from './typed-search-document.js';
|
|
4
4
|
/** Options for {@link searchIndexWriter}. */
|
|
5
5
|
export interface SearchIndexWriterOptions {
|
|
6
6
|
/**
|
|
7
|
-
* The declarative schema: one {@link
|
|
8
|
-
* opens one engine run per
|
|
9
|
-
* run.
|
|
7
|
+
* The declarative schema: one {@link RootType} per collection. The writer
|
|
8
|
+
* opens one engine run per Root Type in it and routes each document to its
|
|
9
|
+
* type’s run. Reference Types are absent from `schema.values()`, so none ever
|
|
10
|
+
* earns a run. Must be the same schema the stages project through.
|
|
10
11
|
*/
|
|
11
12
|
schema: SearchSchema;
|
|
12
13
|
/**
|
|
13
14
|
* The engine writer that owns a given root type’s collection – e.g. a
|
|
14
15
|
* `@lde/search-typesense` `BlueGreenRebuild` bound to that type and the
|
|
15
|
-
* collection name it keeps its alias on. Called once per {@link
|
|
16
|
+
* collection name it keeps its alias on. Called once per {@link RootType}
|
|
16
17
|
* in the schema when the writer is built.
|
|
17
18
|
*
|
|
18
19
|
* A single-collection deployment returns one writer for its one type; a
|
|
@@ -22,7 +23,7 @@ export interface SearchIndexWriterOptions {
|
|
|
22
23
|
* own collection, alias and cross-pod lock. The per-collection fan-out is this
|
|
23
24
|
* writer’s job.
|
|
24
25
|
*/
|
|
25
|
-
writerFor: (searchType:
|
|
26
|
+
writerFor: (searchType: RootType) => Writer<SearchDocument>;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* The single terminal of a search-indexing pipeline: an engine-agnostic router
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-index-writer.d.ts","sourceRoot":"","sources":["../src/search-index-writer.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"search-index-writer.d.ts","sourceRoot":"","sources":["../src/search-index-writer.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;;;;;;;;;;;OAYG;IACH,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,KAAK,MAAM,CAAC,cAAc,CAAC,CAAC;CAC7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,MAAM,CAAC,mBAAmB,CAAC,CAoI7B"}
|
package/dist/search-stages.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Stage, type ItemSelector, type StageReaders } from '@lde/pipeline';
|
|
2
|
-
import { type
|
|
2
|
+
import { type RootType, type SearchSchema } from '@lde/search';
|
|
3
3
|
import type { TypedSearchDocument } from './typed-search-document.js';
|
|
4
4
|
/** One root type’s stage in a search pipeline. */
|
|
5
5
|
export interface SearchStageType {
|
|
6
6
|
/**
|
|
7
|
-
* The {@link
|
|
7
|
+
* The {@link RootType} this stage projects. Must belong to
|
|
8
8
|
* {@link SearchStagesOptions.schema} (matched by `class`); the stage projects
|
|
9
9
|
* with the schema’s own declaration object, so `assertTypeInSchema`’s identity
|
|
10
|
-
* check inside {@link projectRoots} always holds.
|
|
10
|
+
* check inside {@link projectRoots} always holds. A Reference Type is never a
|
|
11
|
+
* stage: it is reached only through an inline reference, never selected.
|
|
11
12
|
*/
|
|
12
|
-
searchType:
|
|
13
|
+
searchType: RootType;
|
|
13
14
|
/**
|
|
14
15
|
* The selector variable that binds this type’s roots – the CONSTRUCT subject
|
|
15
16
|
* the batch is complete for. Must **not** be `dataset`: `?dataset` is
|
|
@@ -68,7 +69,7 @@ export declare function searchStages(options: SearchStagesOptions): Stage<TypedS
|
|
|
68
69
|
/**
|
|
69
70
|
* An {@link ItemSelector} that selects every instance of a root type’s source
|
|
70
71
|
* class: `SELECT ?‹rootVariable› WHERE { ?‹rootVariable› a <class> }`. A
|
|
71
|
-
* convenience for the **object grain**, where {@link
|
|
72
|
+
* convenience for the **object grain**, where {@link RootType.class} really is
|
|
72
73
|
* the source class – **not** a default: root selection is a deployment concern,
|
|
73
74
|
* and three of the Dataset Register’s four catalog types have no source class at
|
|
74
75
|
* all (their entry point – “registered, newest registration, has a title” – is a
|
|
@@ -78,5 +79,5 @@ export declare function searchStages(options: SearchStagesOptions): Stage<TypedS
|
|
|
78
79
|
* {@link SearchStageType.rootVariable}; it must not be `dataset` (reserved by the
|
|
79
80
|
* SPARQL reader).
|
|
80
81
|
*/
|
|
81
|
-
export declare function selectByClass(searchType:
|
|
82
|
+
export declare function selectByClass(searchType: RootType, rootVariable?: string): ItemSelector;
|
|
82
83
|
//# sourceMappingURL=search-stages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-stages.d.ts","sourceRoot":"","sources":["../src/search-stages.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAgB,KAAK,
|
|
1
|
+
{"version":3,"file":"search-stages.d.ts","sourceRoot":"","sources":["../src/search-stages.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAgB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,UAAU,EAAE,QAAQ,CAAC;IACrB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B,yDAAyD;IACzD,OAAO,EAAE,YAAY,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB,4DAA4D;IAC5D,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,mBAAmB,GAC3B,KAAK,CAAC,mBAAmB,CAAC,EAAE,CA8C9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,QAAQ,EACpB,YAAY,SAAS,GACpB,YAAY,CAId"}
|
package/dist/search-stages.js
CHANGED
|
@@ -55,7 +55,7 @@ export function searchStages(options) {
|
|
|
55
55
|
/**
|
|
56
56
|
* An {@link ItemSelector} that selects every instance of a root type’s source
|
|
57
57
|
* class: `SELECT ?‹rootVariable› WHERE { ?‹rootVariable› a <class> }`. A
|
|
58
|
-
* convenience for the **object grain**, where {@link
|
|
58
|
+
* convenience for the **object grain**, where {@link RootType.class} really is
|
|
59
59
|
* the source class – **not** a default: root selection is a deployment concern,
|
|
60
60
|
* and three of the Dataset Register’s four catalog types have no source class at
|
|
61
61
|
* all (their entry point – “registered, newest registration, has a title” – is a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootType, SearchDocument } from '@lde/search';
|
|
2
2
|
/**
|
|
3
|
-
* A projected {@link SearchDocument} paired with the {@link
|
|
3
|
+
* A projected {@link SearchDocument} paired with the {@link RootType} it was
|
|
4
4
|
* projected from.
|
|
5
5
|
*
|
|
6
6
|
* A search pipeline is N per-type stages writing to one terminal, and
|
|
@@ -17,7 +17,7 @@ import type { SearchDocument, SearchType } from '@lde/search';
|
|
|
17
17
|
* ([ADR 13](https://github.com/ldelements/lde/blob/main/docs/decisions/0013-project-inside-the-batch-per-root-type.md)).
|
|
18
18
|
*/
|
|
19
19
|
export interface TypedSearchDocument {
|
|
20
|
-
readonly searchType:
|
|
20
|
+
readonly searchType: RootType;
|
|
21
21
|
readonly document: SearchDocument;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=typed-search-document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-search-document.d.ts","sourceRoot":"","sources":["../src/typed-search-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"typed-search-document.d.ts","sourceRoot":"","sources":["../src/typed-search-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/search-pipeline",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Search indexing as an @lde/pipeline instance: a Writer<Quad> that applies the @lde/search projection to extracted RDF and fans each document out to the transactional engine writer for its type's collection. Glue between the pipeline quad world and the search-engine document world; owns no projection or engine logic itself.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/ldelements/lde.git",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"!**/*.tsbuildinfo"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@lde/search": "^0.
|
|
28
|
+
"@lde/search": "^0.11.0",
|
|
29
29
|
"tslib": "^2.3.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@lde/search-typesense": "^0.
|
|
32
|
+
"@lde/search-typesense": "^0.13.0",
|
|
33
33
|
"@rdfjs/types": "^2.0.1",
|
|
34
34
|
"n3": "^2.1.1",
|
|
35
35
|
"testcontainers": "^12.0.3",
|