@lde/search-pipeline 0.11.2 → 0.12.1

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/README.md CHANGED
@@ -155,7 +155,10 @@ the CONSTRUCT’s subject yields a batch that is not root-complete, and projecti
155
155
  will then silently emit partial documents – a promise `@lde/pipeline` cannot
156
156
  check ([ADR 13](../../docs/decisions/0013-project-inside-the-batch-per-root-type.md)).
157
157
  `selectByClass(searchType)` is a convenience for the object grain (where the
158
- type’s `class` really is the source class), **not** a default.
158
+ type’s `class` really is the source class), **not** a default. It excludes
159
+ blank-node subjects (`FILTER(!isBlank(?root))`): a blank node has no stable
160
+ document key, so it can never become a search document – a custom selector
161
+ should exclude them too.
159
162
 
160
163
  ## Per-collection isolation
161
164
 
@@ -83,6 +83,12 @@ export declare function searchStages(options: SearchStagesOptions): Stage<TypedS
83
83
  * all (their entry point – “registered, newest registration, has a title” – is a
84
84
  * deployment fact no schema states).
85
85
  *
86
+ * **Blank-node subjects are excluded** (`FILTER(!isBlank(?‹rootVariable›))`): a
87
+ * blank node has no stable document key, so it can never become a search
88
+ * document – framing skips it. Excluding it at the endpoint keeps result pages
89
+ * full, so pagination walks the whole class instead of stopping at the first
90
+ * page a client-side drop would leave short.
91
+ *
86
92
  * `rootVariable` defaults to `root` and must match the stage’s
87
93
  * {@link SearchStageType.rootVariable}; it must not be `dataset` (reserved by the
88
94
  * SPARQL reader).
@@ -1 +1 @@
1
- {"version":3,"file":"search-stages.d.ts","sourceRoot":"","sources":["../src/search-stages.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAgB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,kDAAkD;AAClD,MAAM,WAAW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OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;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,CAwD9B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,QAAQ,EACpB,YAAY,SAAS,GACpB,YAAY,CAId"}
@@ -71,12 +71,18 @@ export function searchStages(options) {
71
71
  * all (their entry point – “registered, newest registration, has a title” – is a
72
72
  * deployment fact no schema states).
73
73
  *
74
+ * **Blank-node subjects are excluded** (`FILTER(!isBlank(?‹rootVariable›))`): a
75
+ * blank node has no stable document key, so it can never become a search
76
+ * document – framing skips it. Excluding it at the endpoint keeps result pages
77
+ * full, so pagination walks the whole class instead of stopping at the first
78
+ * page a client-side drop would leave short.
79
+ *
74
80
  * `rootVariable` defaults to `root` and must match the stage’s
75
81
  * {@link SearchStageType.rootVariable}; it must not be `dataset` (reserved by the
76
82
  * SPARQL reader).
77
83
  */
78
84
  export function selectByClass(searchType, rootVariable = 'root') {
79
85
  return new SparqlItemSelector({
80
- query: `SELECT ?${rootVariable} WHERE { ?${rootVariable} a <${searchType.class}> }`,
86
+ query: `SELECT ?${rootVariable} WHERE { ?${rootVariable} a <${searchType.class}> FILTER(!isBlank(?${rootVariable})) }`,
81
87
  });
82
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/search-pipeline",
3
- "version": "0.11.2",
3
+ "version": "0.12.1",
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,14 +25,14 @@
25
25
  "!**/*.tsbuildinfo"
26
26
  ],
27
27
  "dependencies": {
28
- "@lde/search": "^0.12.0",
28
+ "@lde/search": "^0.12.1",
29
29
  "@traqula/generator-sparql-1-1": "^1.1.8",
30
30
  "@traqula/parser-sparql-1-1": "^1.1.5",
31
31
  "@traqula/rules-sparql-1-1": "^1.1.0",
32
32
  "tslib": "^2.3.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@lde/search-typesense": "^0.14.2",
35
+ "@lde/search-typesense": "^0.15.1",
36
36
  "@rdfjs/types": "^2.0.1",
37
37
  "n3": "^2.1.1",
38
38
  "testcontainers": "^12.0.3",
@@ -40,6 +40,6 @@
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@lde/dataset": "^0.7.8",
43
- "@lde/pipeline": "^0.34.4"
43
+ "@lde/pipeline": "^0.35.0"
44
44
  }
45
45
  }