@lde/search 0.24.4 → 0.26.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/engine.d.ts CHANGED
@@ -123,10 +123,13 @@ export type SearchValue = string | number | boolean | readonly string[] | Locali
123
123
  * values grouped together, so a multi-valued reference never degrades into
124
124
  * parallel arrays a consumer has to pair by index.
125
125
  *
126
- * `id` is present only when the referent is a named node: nesting carries the
127
- * referent’s fields, not a document key, so a blank-node referent nests exactly
128
- * like a named one, minus the `id`. Distinct from {@link Reference}, which is
129
- * what an `idOnly`/`labelOnly` reference carries – there the IRI *is* the value.
126
+ * **No `id`**: nesting carries the referent’s fields, not a document key, and a
127
+ * Reference Type is kept in no collection for a key to address it in. A named
128
+ * node and a blank one therefore nest alike. The exception is a
129
+ * {@link ReferenceStrategy.local local} lookup, which nests a Root Type – there
130
+ * the `id` is the key its own collection files the referent under, and the
131
+ * lookup resolves against it. Distinct from {@link Reference}, which is what an
132
+ * `idOnly`/`labelOnly` reference carries – there the IRI *is* the value.
130
133
  */
131
134
  export interface NestedDocument {
132
135
  readonly [field: string]: SearchValue | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACX,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,YAAY,CAC3B,KAAK,SAAS,SAAS,UAAU,EAAE,GAAG,SAAS,UAAU,EAAE;IAE3D;uDACmD;IACnD,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,CAAC,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,EAChC,UAAU,EAAE,CAAC,EACb,KA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,11 +2,11 @@ import type { Quad } from '@rdfjs/types';
2
2
  import { type FramedNode } from './frame-by-type.js';
3
3
  import { type ProjectionValue, type RootType, type SearchSchema, type SearchType } from './schema.js';
4
4
  /**
5
- * A projected node: the fields of one {@link SearchType}, flat. A root always
6
- * carries the `id` that keys it – it is a {@link SearchDocument} – but an inline
7
- * referent carries one only when the referent is a named node: a nested document
8
- * is not a document key, so nesting needs the referent’s fields, not its
9
- * identity.
5
+ * A projected node: the fields of one {@link SearchType}, flat. A **Root Type**
6
+ * carries the `id` that keys it – as a root it is a {@link SearchDocument}, and
7
+ * nested by a {@link ReferenceStrategy.local local} lookup it is what the lookup
8
+ * resolves against. A **Reference Type** never does: it is kept in no collection,
9
+ * so nesting needs the referent’s fields and not its identity.
10
10
  */
11
11
  export type ProjectedNode = Record<string, unknown>;
12
12
  /** A flat search document. `id` is the engine document key. */
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAkBL,KAAK,eAAe,EAEpB,KAAK,QAAQ,EAEb,KAAK,YAAY,EACjB,KAAK,UAAU,EAEhB,MAAM,aAAa,CAAC;AAErB;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAChD,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAC1C;IACC,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;C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,OAAO,GAAE,iBAAyC,GACjD,cAAc,CAgBhB;AAmID;;;;;;;;;;;;GAYG;AACH,wBAAuB,YAAY,CACjC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,EACrB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,QAAQ,EACpB,OAAO,GAAE,iBAAyC,GACjD,aAAa,CAAC,cAAc,CAAC,CAc/B"}
package/dist/project.js CHANGED
@@ -69,11 +69,11 @@ function pruneInternalFields(document, searchType, schema) {
69
69
  * Pruning is deferred to a single recursive pass ({@link pruneInternalFields})
70
70
  * once the whole nested structure is projected, so a derive at any depth can
71
71
  * still read an internal field before it is removed. */
72
- function projectFields(node, searchType, schema, context) {
72
+ function projectFields(node, searchType, schema, context, nested = false) {
73
73
  const id = documentIdOf(node, searchType);
74
74
  const document = id === undefined ? {} : { id };
75
75
  for (const field of searchType.fields) {
76
- applyField(document, node, field, searchType, schema, context);
76
+ applyField(document, node, field, searchType, schema, context, nested);
77
77
  }
78
78
  return document;
79
79
  }
@@ -103,6 +103,18 @@ function documentKey(node) {
103
103
  * `idOnly` reference over the same path.
104
104
  */
105
105
  function documentIdOf(node, searchType) {
106
+ // A Reference Type is nested inside its referrer and keyed in no collection
107
+ // of its own, so its entries carry no `id` – whether or not the graph happened
108
+ // to name the node. Nesting carries a referent's FIELDS, not a document key
109
+ // (ADR 24), and nothing reads one here: the collection declares an `id` for a
110
+ // locally-nested Root Type alone, a weld names the flat identity companion
111
+ // beside the entry, and an entry's own key answers no query. Emitting it made
112
+ // an entry's shape depend on whether a publisher minted an IRI for a
113
+ // relationship – arbitrary to a consumer, and a field the collection never
114
+ // declared.
115
+ if (searchType.class === undefined) {
116
+ return undefined;
117
+ }
106
118
  const nodeIri = documentKey(node);
107
119
  if (nodeIri === undefined || searchType.key === undefined) {
108
120
  return nodeIri;
@@ -145,7 +157,7 @@ export async function* projectRoots(quads, roots, schema, searchType, context =
145
157
  yield projectDocument(node, searchType, schema, context);
146
158
  }
147
159
  }
148
- function applyField(document, node, field, searchType, schema, context) {
160
+ function applyField(document, node, field, searchType, schema, context, nested) {
149
161
  // The three value sources, mutually exclusive by declaration
150
162
  // (`validateSearchType`): a projection value, a computed value, a graph path.
151
163
  if ((field.kind === 'keyword' || field.kind === 'reference') &&
@@ -201,7 +213,7 @@ function applyField(document, node, field, searchType, schema, context) {
201
213
  // project nothing rather than fall through and emit the referent IRIs under
202
214
  // the field name (the wrong shape).
203
215
  if (schema !== undefined) {
204
- applyInlineReference(document, node, alias, field, schema, context);
216
+ applyInlineReference(document, node, alias, field, schema, context, nested);
205
217
  }
206
218
  return;
207
219
  }
@@ -217,7 +229,7 @@ function applyField(document, node, field, searchType, schema, context) {
217
229
  // a filter can reach – an engine welds conditions on an entry's LEAF
218
230
  // fields only. `filterable` therefore fans out the id beside the object,
219
231
  // exactly as an inline reference's identity companion does.
220
- applyLocalIdentity(document, endpoints, field, schema);
232
+ applyLocalIdentity(document, endpoints, field, schema, nested);
221
233
  return;
222
234
  }
223
235
  }
@@ -464,7 +476,10 @@ function applyProjectionValue(document, field, from, context, schema) {
464
476
  * {@link ProjectedNode} for a single reference, an array for an `array` one.
465
477
  * A referent needs **no identity**: nesting carries its fields, not a document
466
478
  * key, so a blank-node referent – whose `@id` JSON-LD 1.1 framing prunes when its
467
- * label occurs once – nests exactly like a named one, minus the `id`.
479
+ * label occurs once – nests exactly like a named one. Neither carries an `id`:
480
+ * a Reference Type is kept in no collection, so nothing resolves an entry by
481
+ * key, and an entry's shape no longer depends on whether a publisher minted an
482
+ * IRI for the relationship ({@link documentIdOf}).
468
483
  * The referent is projected in full – internal fields included – so the
469
484
  * declaring type’s (or the reference type’s own) derives can read them;
470
485
  * {@link pruneInternalFields} then removes the internal fields from a *surfaced*
@@ -473,7 +488,7 @@ function applyProjectionValue(document, field, from, context, schema) {
473
488
  * the schema’s declared depth. The referent type is guaranteed declared by
474
489
  * {@link searchSchema}.
475
490
  */
476
- function applyInlineReference(document, node, alias, field, schema, context) {
491
+ function applyInlineReference(document, node, alias, field, schema, context, nested) {
477
492
  // Resolves for a schema that declares the referent (always so for the schema a
478
493
  // type is projected through); a type framed against a foreign schema that
479
494
  // omits it simply contributes no nesting.
@@ -482,7 +497,7 @@ function applyInlineReference(document, node, alias, field, schema, context) {
482
497
  return;
483
498
  }
484
499
  const referents = applyNestedReferents(document, valuesOf(node, alias), field, referenceType, schema, context);
485
- applyIdentityCompanion(document, referents, field, schema);
500
+ applyIdentityCompanion(document, referents, field, schema, nested);
486
501
  }
487
502
  /**
488
503
  * Write the {@link ReferenceStrategy.identity identity companion} of an inline
@@ -500,7 +515,7 @@ function applyInlineReference(document, node, alias, field, schema, context) {
500
515
  * `id`. Both are read here, because which one a deployment declares is about
501
516
  * how much of the referent it wants to display – not about what identifies it.
502
517
  */
503
- function applyIdentityCompanion(document, referents, field, schema) {
518
+ function applyIdentityCompanion(document, referents, field, schema, nested) {
504
519
  const names = physicalFields(field, schema);
505
520
  if (names.identity === undefined) {
506
521
  return;
@@ -518,15 +533,45 @@ function applyIdentityCompanion(document, referents, field, schema) {
518
533
  if (ids.length === 0) {
519
534
  return;
520
535
  }
521
- setArray(document, names.identity, ids);
536
+ setIdentity(document, names.identity, ids, field, nested);
522
537
  // Same rule as every other facetable reference: where the target declares a
523
538
  // facet policy, the facet reads a narrowed companion of its own, so an
524
539
  // excluded id is never seen by the engine rather than merely unlabelled.
525
540
  const policy = inheritedFacetKeys(field, schema);
526
541
  if (policy !== undefined) {
527
- setArray(document, names.facet, ids.filter(policy.only));
542
+ setIdentity(document, names.facet, ids.filter(policy.only), field, nested);
528
543
  }
529
544
  }
545
+ /**
546
+ * Write an identity companion under the arity of the reference it belongs to –
547
+ * `array` decides the shape here exactly as it does for every other kind
548
+ * ({@link applyFacet}).
549
+ *
550
+ * It matters most where the companion is a **nested** leaf. That is the field a
551
+ * weld actually names – the endpoint's own id is a level deeper than a weld can
552
+ * reach – and a weld asks whether ONE entry satisfies every condition. A
553
+ * companion holding a list inside an entry stands for each of its ids at once,
554
+ * so the entry answers the weld with none of them; a Typesense 30.2 engine does
555
+ * not answer at all, and hangs (ADR 26). The entry fans out instead
556
+ * ({@link tuplesOf}), which leaves exactly one id per entry for this to write.
557
+ *
558
+ * A top-level companion is unaffected: it is a flat field standing for the whole
559
+ * document rather than for one entry, so an `array` reference's companion holds
560
+ * every id its entries reference, as it always has.
561
+ */
562
+ function setIdentity(document, name, ids, field, nested) {
563
+ // `filterable` is the whole condition, and it is about the COMPANION rather
564
+ // than about the split. `tuplesOf` splits the identity field whatever Role
565
+ // earned it, so an entry holds one id either way – but only a `filterable`
566
+ // reference has a weld to serve, and only there is the single value worth the
567
+ // narrower declared type the collection then matches. A `facetable`-only
568
+ // companion stays a list, which is what a facet reads.
569
+ if (!nested || field.array === true || field.filterable !== true) {
570
+ setArray(document, name, ids);
571
+ return;
572
+ }
573
+ setString(document, name, ids[0]);
574
+ }
530
575
  /**
531
576
  * Write the identity companion of a {@link ReferenceStrategy.local local}
532
577
  * lookup: the ids of the endpoints just stored, under the flat physical name an
@@ -535,7 +580,7 @@ function applyIdentityCompanion(document, referents, field, schema) {
535
580
  * Nothing to do where the field is not `filterable`: without that Role there is
536
581
  * no companion, and the endpoint is display weight like every other nesting.
537
582
  */
538
- function applyLocalIdentity(document, endpoints, field, schema) {
583
+ function applyLocalIdentity(document, endpoints, field, schema, nested) {
539
584
  const names = physicalFields(field, schema);
540
585
  if (names.identity === undefined) {
541
586
  return;
@@ -547,9 +592,7 @@ function applyLocalIdentity(document, endpoints, field, schema) {
547
592
  const ids = dedupe(stored
548
593
  .map((endpoint) => endpoint.id)
549
594
  .filter((id) => typeof id === 'string'));
550
- if (ids.length > 0) {
551
- setArray(document, names.identity, ids);
552
- }
595
+ setIdentity(document, names.identity, ids, field, nested);
553
596
  }
554
597
  /** The id a value under an identity field carries: the value itself when the
555
598
  * field stores bare ids, its `id` when it stores nested documents. */
@@ -575,20 +618,90 @@ function identityValue(value) {
575
618
  * target’s collection files it under, and the lookup can find it.
576
619
  */
577
620
  function applyNestedReferents(document, values, field, nestedType, schema, context) {
621
+ // One node may stand for several entries: a weldable leaf is single-valued,
622
+ // so an edge the graph gave several roles or several endpoints fans out into
623
+ // one entry per combination BEFORE it is projected (ADR 26).
578
624
  const referents = values
579
625
  .filter(isObject)
580
- .map((referent) => projectFields(referent, nestedType, schema, context))
626
+ .flatMap((value) => tuplesOf(value, nestedType, field))
627
+ .map((tuple) => projectFields(tuple, nestedType, schema, context, true))
581
628
  // Fields, not identity, are what makes something a referent: a literal
582
629
  // value object under the alias (dirty source data), or a node this
583
630
  // reference type reads nothing from, projects nothing and is no referent.
584
631
  // Nesting it would hand the writer a content-free document – and, for a
585
632
  // single-valued reference, let it win the slot over a real referent.
586
633
  .filter((referent) => Object.keys(referent).length > 0);
587
- if (referents.length === 0) {
588
- return referents;
589
- }
590
- document[field.name] = field.array === true ? referents : referents[0];
591
- return referents;
634
+ // Fan-out splits RAW framed values, and two distinct ones can still collapse
635
+ // downstream – a `transform` mapping two spellings onto one canonical value,
636
+ // or a keyed target re-keying two referent IRIs to the same document key. The
637
+ // pre-fan-out shape deduped, because those values met inside one entry and
638
+ // `applyFacet` deduped them there; split across entries they would reach the
639
+ // index and the API as byte-identical duplicates instead.
640
+ const distinct = dedupeBy(referents, (referent) => JSON.stringify(referent));
641
+ if (distinct.length === 0) {
642
+ return distinct;
643
+ }
644
+ document[field.name] = field.array === true ? distinct : distinct[0];
645
+ return distinct;
646
+ }
647
+ /**
648
+ * Split one framed edge node into the entries it stands for: the cartesian
649
+ * product of its **weldable** leaves’ values, one value each.
650
+ *
651
+ * A weld asks whether ONE entry satisfies every condition, so a leaf a weld can
652
+ * name (`filterable` – `searchSchema` refuses `array` on one) states a single
653
+ * value. An edge the graph gave two roles and two endpoints is therefore four
654
+ * entries rather than one entry holding two lists, which stands for all four at
655
+ * once and answers the weld with none of them. See
656
+ * [ADR 26](../../docs/decisions/0026-fan-out-a-qualified-edge-into-one-entry-per-tuple.md).
657
+ *
658
+ * Done on the **framed node**, before projection, so each leaf reaches
659
+ * {@link applyField} single-valued and passes through `transform`, folding and
660
+ * the facet companion exactly as a single-valued field always has – no
661
+ * downstream step learns that fan-out happened. Only the weldable aliases are
662
+ * split: an `output`-only leaf keeps its list, because nothing welds it, and it
663
+ * is shared unchanged across the entries the node fans out to.
664
+ *
665
+ * Inline references only. A {@link ReferenceStrategy.local local} lookup runs
666
+ * through this same body but nests the endpoint’s **own Root Type**, whose
667
+ * fields are multi-valued for reasons of their own – fanning one out would
668
+ * split a person across their `sameAs` values. What a weld names there is the
669
+ * flat `${name}_id` companion, which {@link applyLocalIdentity} already writes
670
+ * beside the object.
671
+ *
672
+ * **Unbounded, deliberately and only for now.** The product grows with the
673
+ * edge's own values, which ADR 12 says is no bound at all. The bound belongs
674
+ * where the data enters memory – the CONSTRUCT already paid for those values,
675
+ * the subject index already holds them, and the framed node already
676
+ * materialised them – not here, at the last and cheapest step to skip. See
677
+ * [#826](https://github.com/ldelements/lde/issues/826).
678
+ */
679
+ function tuplesOf(node, nestedType, field) {
680
+ if (!isInlineReference(field)) {
681
+ return [node];
682
+ }
683
+ // `filterable` names the leaves a weld can condition on directly. The
684
+ // reference's `identity` field joins them: nothing welds it by name, but the
685
+ // flat companion harvested FROM it is the leaf a weld uses to name the
686
+ // endpoint ({@link applyIdentityCompanion}). An entry whose identity field
687
+ // holds three ids stands for three endpoints at once – the same tuple
688
+ // problem, one field further in – so it is a tuple position like any other.
689
+ const identity = field.ref.identity;
690
+ const weldable = nestedType.fields
691
+ .filter((nested) => nested.filterable === true || nested.name === identity)
692
+ .map((nested) => irAlias(nestedType, nested))
693
+ // A leaf the frame carries at most one value for is already a tuple
694
+ // position; splitting it would copy the node to no purpose.
695
+ .filter((alias) => valuesOf(node, alias).length > 1);
696
+ if (weldable.length === 0) {
697
+ return [node];
698
+ }
699
+ let tuples = [node];
700
+ for (const alias of weldable) {
701
+ const values = valuesOf(node, alias);
702
+ tuples = tuples.flatMap((tuple) => values.map((value) => ({ ...tuple, [alias]: value })));
703
+ }
704
+ return tuples;
592
705
  }
593
706
  function langValuesOf(node, key) {
594
707
  return valuesOf(node, key)
@@ -696,6 +809,18 @@ function setNumber(document, field, value) {
696
809
  function dedupe(values) {
697
810
  return [...new Set(values)];
698
811
  }
812
+ /** Keep the first of each distinct `key`, in order. */
813
+ function dedupeBy(values, key) {
814
+ const seen = new Set();
815
+ return values.filter((value) => {
816
+ const identity = key(value);
817
+ if (seen.has(identity)) {
818
+ return false;
819
+ }
820
+ seen.add(identity);
821
+ return true;
822
+ });
823
+ }
699
824
  function setString(document, field, value) {
700
825
  if (value !== undefined && value !== '') {
701
826
  document[field] = value;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGrE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GACnB,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;AAE/E;oEACoE;AACpE,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAAC;AAcnD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAE7E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,MAAM,WAAW,GACrB,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,YAAY,GAAG,YAAY,CAAC;AAE1E,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B;wCACoC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9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M,GAAG,SAAS,CAQhE;AAyBD,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,YAAY,GACpB,cAAc,CAsChB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,GAAG,SAAS,GAC/B,SAAS,GAAG,SAAS,CAcvB"}
package/dist/schema.js CHANGED
@@ -519,10 +519,19 @@ function assertNoInlineCycle(referenceType, referenceTypes, onPath) {
519
519
  * Field}, the reading device that is the other half of an inline reference’s
520
520
  * job.
521
521
  *
522
+ * **`filterable` with `array` is refused**, for a reason about meaning rather
523
+ * than about any engine: a weld asks whether ONE entry satisfies every
524
+ * condition, so a leaf a weld can name states one value per entry. A leaf
525
+ * holding a list stands for every combination at once and answers the weld with
526
+ * none of them. Multiplicity belongs to the entry list instead – the projection
527
+ * emits one entry per combination. An `output`-only nested
528
+ * leaf is untouched: nothing welds it, so it may carry a list for display.
529
+ *
522
530
  * Checked schema-wide, like the label sources and for the same reason: a single
523
531
  * declaration cannot see whether it is a Reference Type at all.
524
532
  *
525
- * See [ADR 24](../../docs/decisions/0024-carry-data-on-a-reference-edge.md).
533
+ * See [ADR 24](../../docs/decisions/0024-carry-data-on-a-reference-edge.md) and
534
+ * [ADR 26](../../docs/decisions/0026-fan-out-a-qualified-edge-into-one-entry-per-tuple.md).
526
535
  */
527
536
  function assertServiceableNestedFields(referenceTypes) {
528
537
  for (const referenceType of referenceTypes.values()) {
@@ -536,6 +545,9 @@ function assertServiceableNestedFields(referenceTypes) {
536
545
  if (field.labelSource !== undefined) {
537
546
  throw new Error(`Nested field “${referenceType.name}.${field.name}” declares a label source, which an inline reference cannot serve; declare a “lookup” on the nested reference instead of resolving a label for it.`);
538
547
  }
548
+ if (field.filterable === true && field.array === true) {
549
+ throw new Error(`Nested field “${referenceType.name}.${field.name}” declares both “filterable” and “array”: a weld asks whether ONE entry satisfies every condition, and an entry holding a list has no single value to test – it stands for each combination at once, so the weld degenerates into the cross-product it exists to exclude. Declare the field single-valued; the projection emits one entry per combination.`);
550
+ }
539
551
  }
540
552
  }
541
553
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/search",
3
- "version": "0.24.4",
3
+ "version": "0.26.0",
4
4
  "description": "Engine- and domain-agnostic core for RDF-backed search: a unified declarative field model (SearchField/SearchType/SearchSchema), a neutral query IR, the SearchEngine port with logical result types, and a streaming CONSTRUCT-to-document projection. Bakes in no engine, protocol, or domain.",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/ldelements/lde.git",