@lde/search 0.41.3 → 0.42.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/project.d.ts.map +1 -1
- package/dist/project.js +49 -56
- package/dist/schema.d.ts +44 -34
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +68 -54
- package/package.json +1 -1
package/dist/project.d.ts.map
CHANGED
|
@@ -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;AAGzC,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EA0BL,KAAK,eAAe,EAIpB,KAAK,QAAQ,EAEb,KAAK,YAAY,EACjB,KAAK,UAAU,EAGhB,MAAM,aAAa,CAAC;AAUrB;;;;;;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;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9D;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,cAAc,CAAC;CAC3C;AAED,qFAAqF;AACrF,MAAM,WAAW,eAAe;IAC9B;0CACsC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAKD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,YAAY,EACrB,OAAO,GAAE,iBAAyC,GACjD,cAAc,CAkBhB;AAgMD;;;;;;;;;;;;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;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,YAAY,GACpB,SAAS,MAAM,EAAE,CAmCnB"}
|
package/dist/project.js
CHANGED
|
@@ -49,8 +49,8 @@ export function projectDocument(node, searchType, schema, context = NO_PROJECTIO
|
|
|
49
49
|
*
|
|
50
50
|
* A Reference Type entry’s `id` is pruned here too. It is a reading device of
|
|
51
51
|
* the same kind: the node IRI a derive on the referrer may read, and never a
|
|
52
|
-
* document key – an entry is kept in no collection, a weld names the
|
|
53
|
-
*
|
|
52
|
+
* document key – an entry is kept in no collection, a weld names the identity
|
|
53
|
+
* field inside it, and an entry’s own key answers no query (ADR
|
|
54
54
|
* 24). Left in, it would make an entry’s shape depend on whether a publisher
|
|
55
55
|
* minted an IRI for a relationship, and be a field the collection never
|
|
56
56
|
* declared. A Root Type keeps its `id` wherever it nests: that is the key its
|
|
@@ -327,8 +327,7 @@ function applyField(document, node, field, searchType, schema, context, sink, ne
|
|
|
327
327
|
// A `local` lookup stores an object, so its own id is a level deeper than
|
|
328
328
|
// a filter can reach – an engine welds conditions on an entry's LEAF
|
|
329
329
|
// fields only, and facets flat values. `filterable` and `facetable`
|
|
330
|
-
// therefore fan out the id beside the object
|
|
331
|
-
// reference’s identity companion does.
|
|
330
|
+
// therefore fan out the id beside the object.
|
|
332
331
|
applyLocalIdentity(document, endpoints, field, schema, nested);
|
|
333
332
|
return;
|
|
334
333
|
}
|
|
@@ -769,7 +768,7 @@ function applyInlineReference(document, node, alias, field, schema, context, sin
|
|
|
769
768
|
const asEdge = edgeReader(referenceType, field.ref.identity);
|
|
770
769
|
const asLiteralEntry = literalReader(referenceType);
|
|
771
770
|
const referents = applyNestedReferents(document, valuesOf(node, alias).map((value) => asLiteralEntry(value) ?? asEdge(value)), field, [referenceType], schema, context, sink);
|
|
772
|
-
|
|
771
|
+
applyNarrowedFacet(document, referents, field, schema, nested);
|
|
773
772
|
}
|
|
774
773
|
/**
|
|
775
774
|
* Read each framed node an inline reference reached as an **edge**: unchanged
|
|
@@ -817,10 +816,12 @@ function literalReader(referenceType) {
|
|
|
817
816
|
: { [literalAlias]: [value] };
|
|
818
817
|
}
|
|
819
818
|
/**
|
|
820
|
-
* Write the
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
819
|
+
* Write the narrowed facet companion of an inline reference naming an
|
|
820
|
+
* {@link ReferenceStrategy.identity identity}, where its target declares a
|
|
821
|
+
* {@link FacetKeys facet policy}: the admitted ids its entries reference,
|
|
822
|
+
* flattened out of the nested documents just projected. Nothing to write
|
|
823
|
+
* otherwise – the engine filters and facets the identity’s leaf inside each
|
|
824
|
+
* entry, which the entries already hold ({@link physicalFields}).
|
|
824
825
|
*
|
|
825
826
|
* Harvested from the entries rather than read from a second path, so what the
|
|
826
827
|
* companion holds is exactly what the entries hold – including the re-keying
|
|
@@ -832,9 +833,9 @@ function literalReader(referenceType) {
|
|
|
832
833
|
* `id`. Both are read here, because which one a deployment declares is about
|
|
833
834
|
* how much of the referent it wants to display – not about what identifies it.
|
|
834
835
|
*/
|
|
835
|
-
function
|
|
836
|
+
function applyNarrowedFacet(document, referents, field, schema, nested) {
|
|
836
837
|
const names = physicalFields(field, schema);
|
|
837
|
-
if (names.
|
|
838
|
+
if (nested || names.facet === undefined || names.facet === names.filter) {
|
|
838
839
|
return;
|
|
839
840
|
}
|
|
840
841
|
const identity = field.ref.identity;
|
|
@@ -848,23 +849,23 @@ function applyIdentityCompanion(document, referents, field, schema, nested) {
|
|
|
848
849
|
const targetById = new Map();
|
|
849
850
|
for (const referent of stored) {
|
|
850
851
|
const remembered = referent[REFERENT_TARGETS];
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
targetById.set(id, isObject(value) && typeof value[TARGET_FIELD] === 'string'
|
|
858
|
-
? value[TARGET_FIELD]
|
|
859
|
-
: remembered?.get(id)?.name);
|
|
852
|
+
// Single-valued: the identity field is `filterable`, and a filterable
|
|
853
|
+
// nested field states one value per entry.
|
|
854
|
+
const value = referent[identity];
|
|
855
|
+
const id = identityValue(value);
|
|
856
|
+
if (id === undefined || targetById.has(id)) {
|
|
857
|
+
continue;
|
|
860
858
|
}
|
|
859
|
+
targetById.set(id, isObject(value) && typeof value[TARGET_FIELD] === 'string'
|
|
860
|
+
? value[TARGET_FIELD]
|
|
861
|
+
: remembered?.get(id)?.name);
|
|
861
862
|
}
|
|
862
|
-
|
|
863
|
+
writeNarrowedFacet(document, names, targetById, field, referencedTargetsOf(identityFieldOf(field, schema), schema), schema, nested);
|
|
863
864
|
}
|
|
864
865
|
/**
|
|
865
|
-
* Write
|
|
866
|
-
* `array` decides the shape here exactly as it does for every
|
|
867
|
-
* ({@link applyFacet}).
|
|
866
|
+
* Write a local lookup’s identity companion under the arity of the reference it
|
|
867
|
+
* belongs to – `array` decides the shape here exactly as it does for every
|
|
868
|
+
* other kind ({@link applyFacet}).
|
|
868
869
|
*
|
|
869
870
|
* It matters most where the companion is a **nested** leaf. That is the field a
|
|
870
871
|
* weld actually names – the endpoint's own id is a level deeper than a weld can
|
|
@@ -879,12 +880,10 @@ function applyIdentityCompanion(document, referents, field, schema, nested) {
|
|
|
879
880
|
* every id its entries reference, as it always has.
|
|
880
881
|
*/
|
|
881
882
|
function setIdentity(document, name, ids, field, nested) {
|
|
882
|
-
// `filterable` is the whole condition
|
|
883
|
-
//
|
|
884
|
-
//
|
|
885
|
-
//
|
|
886
|
-
// narrower declared type the collection then matches. A `facetable`-only
|
|
887
|
-
// companion stays a list, which is what a facet reads.
|
|
883
|
+
// `filterable` is the whole condition: only a `filterable` reference has a
|
|
884
|
+
// weld to serve, and {@link tuplesOf} splits only `filterable` fields, so
|
|
885
|
+
// only there does an entry hold the single id the narrower declared type
|
|
886
|
+
// matches. A `facetable`-only companion stays a list, which a facet reads.
|
|
888
887
|
if (!nested || field.array === true || field.filterable !== true) {
|
|
889
888
|
setArray(document, name, ids);
|
|
890
889
|
return;
|
|
@@ -921,31 +920,30 @@ function applyLocalIdentity(document, endpoints, field, schema, nested) {
|
|
|
921
920
|
const target = endpoint[TARGET_FIELD];
|
|
922
921
|
targetById.set(endpoint.id, typeof target === 'string' ? target : undefined);
|
|
923
922
|
}
|
|
924
|
-
|
|
923
|
+
const ids = [...targetById.keys()];
|
|
924
|
+
if (ids.length === 0) {
|
|
925
|
+
return;
|
|
926
|
+
}
|
|
927
|
+
setIdentity(document, names.identity, ids, field, nested);
|
|
928
|
+
writeNarrowedFacet(document, names, targetById, field, referencedTargetsOf(field, schema), schema, nested);
|
|
925
929
|
}
|
|
926
930
|
/**
|
|
927
|
-
* Write
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
* reference, so an excluded id is never seen by the engine rather
|
|
931
|
-
* unlabelled.
|
|
931
|
+
* Write the narrowed facet companion of a local lookup or an inline reference’s
|
|
932
|
+
* identity, where a target declares a facet policy: the admitted ids, each
|
|
933
|
+
* judged by the target it was resolved through – the same rule as every other
|
|
934
|
+
* facetable reference, so an excluded id is never seen by the engine rather
|
|
935
|
+
* than merely unlabelled. Nothing to write without a policy, where the facet
|
|
936
|
+
* reads the filter field itself.
|
|
932
937
|
*
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
* collection declares one there for it to fill.
|
|
938
|
+
* Written at the top level only: the companion counts root documents, so no
|
|
939
|
+
* collection declares one inside an entry for it to fill.
|
|
936
940
|
*/
|
|
937
|
-
function
|
|
938
|
-
|
|
939
|
-
const ids = [...targetById.keys()];
|
|
940
|
-
if (names.identity === undefined || ids.length === 0) {
|
|
941
|
+
function writeNarrowedFacet(document, names, targetById, field, targets, schema, nested) {
|
|
942
|
+
if (nested || names.facet === undefined || names.facet === names.filter) {
|
|
941
943
|
return;
|
|
942
944
|
}
|
|
943
|
-
setIdentity(document, names.identity, ids, field, nested);
|
|
944
945
|
const policies = inheritedFacetPolicies(field, schema);
|
|
945
|
-
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
948
|
-
setIdentity(document, names.facet, ids.filter((id) => admitsFacet(policies, targets, targetById.get(id), id)), field, nested);
|
|
946
|
+
setArray(document, names.facet, [...targetById.keys()].filter((id) => admitsFacet(policies, targets, targetById.get(id), id)));
|
|
949
947
|
}
|
|
950
948
|
/** The id a value under an identity field carries: the value itself when the
|
|
951
949
|
* field stores bare ids, its `id` when it stores nested documents. */
|
|
@@ -1060,15 +1058,10 @@ function tuplesOf(node, nestedType, field) {
|
|
|
1060
1058
|
if (!isInlineReference(field)) {
|
|
1061
1059
|
return [node];
|
|
1062
1060
|
}
|
|
1063
|
-
// `filterable` names the leaves a weld can condition on directly
|
|
1064
|
-
// reference's `identity` field
|
|
1065
|
-
// flat companion harvested FROM it is the leaf a weld uses to name the
|
|
1066
|
-
// endpoint ({@link applyIdentityCompanion}). An entry whose identity field
|
|
1067
|
-
// holds three ids stands for three endpoints at once – the same tuple
|
|
1068
|
-
// problem, one field further in – so it is a tuple position like any other.
|
|
1069
|
-
const identity = field.ref.identity;
|
|
1061
|
+
// `filterable` names the leaves a weld can condition on directly – the
|
|
1062
|
+
// reference's `identity` field among them, which must be filterable.
|
|
1070
1063
|
const weldable = nestedType.fields
|
|
1071
|
-
.filter((nested) => nested.filterable === true
|
|
1064
|
+
.filter((nested) => nested.filterable === true)
|
|
1072
1065
|
.map((nested) => irAlias(nestedType, nested))
|
|
1073
1066
|
// A leaf the frame carries at most one value for is already a tuple
|
|
1074
1067
|
// position; splitting it would copy the node to no purpose.
|
package/dist/schema.d.ts
CHANGED
|
@@ -288,12 +288,12 @@ export type ReferenceStrategy = {
|
|
|
288
288
|
* the reference type’s own filterable fields.
|
|
289
289
|
*
|
|
290
290
|
* A nested object is not something an engine can filter or facet by id,
|
|
291
|
-
* so
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
291
|
+
* so the engine filters and facets the named field’s **leaf inside each
|
|
292
|
+
* entry** in the nested object’s place ({@link PhysicalFields.filter}).
|
|
293
|
+
* Typesense flattens a leaf under an `object[]` into one list per
|
|
294
|
+
* document, so a facet on it counts each document once, however many of
|
|
295
|
+
* its entries name the same endpoint. The named field must therefore be
|
|
296
|
+
* `filterable`, which is what indexes that leaf.
|
|
297
297
|
*
|
|
298
298
|
* Declared rather than inferred, because a reference type may carry more
|
|
299
299
|
* than one nested reference and only the schema author knows which one
|
|
@@ -302,7 +302,7 @@ export type ReferenceStrategy = {
|
|
|
302
302
|
* these ids are, which is what a facet policy is inherited through
|
|
303
303
|
* ({@link inheritedFacetPolicies}) and what types the filter at the surface.
|
|
304
304
|
*
|
|
305
|
-
* The
|
|
305
|
+
* The leaf holds ids only, so a facet over it is exact and
|
|
306
306
|
* identity-keyed: an entry whose endpoint the graph named inline – a
|
|
307
307
|
* literal, a blank node – contributes no bucket rather than a bucket
|
|
308
308
|
* keyed on a label, so two endpoints that share a label are never merged.
|
|
@@ -801,8 +801,8 @@ export declare function isInlineReference(field: SearchField): field is Referenc
|
|
|
801
801
|
* Role is a reading device, pruned before the writer
|
|
802
802
|
* ({@link isInternalField}), while one that is `filterable` or `facetable`
|
|
803
803
|
* without being `output` still has its entries stored – they are what a nested
|
|
804
|
-
* filter constrains and what
|
|
805
|
-
* {@link ReferenceStrategy.identity identity
|
|
804
|
+
* filter constrains and what a
|
|
805
|
+
* {@link ReferenceStrategy.identity identity} is filtered and faceted on. Only
|
|
806
806
|
* `output` decides whether they are *surfaced*, which is the surfaces’ own
|
|
807
807
|
* question ({@link outputFields}).
|
|
808
808
|
*
|
|
@@ -1027,20 +1027,28 @@ export interface PhysicalFields {
|
|
|
1027
1027
|
/** Per-locale folded sort keys `${name}_sort_${locale}` (localized text,
|
|
1028
1028
|
* `sortable`); a non-localized field sorts on its own `name` field. */
|
|
1029
1029
|
readonly sort: readonly string[];
|
|
1030
|
-
/** The field a facet on this field reads, when `facetable`: the field
|
|
1031
|
-
*
|
|
1032
|
-
* {@link FacetKeys facet policy} admits. `undefined` for a field
|
|
1033
|
-
* not facetable. */
|
|
1030
|
+
/** The field a facet on this field reads, when `facetable`: the field a
|
|
1031
|
+
* {@link filter} reads, or the `_facet` companion holding the subset its
|
|
1032
|
+
* target’s {@link FacetKeys facet policy} admits. `undefined` for a field
|
|
1033
|
+
* that is not facetable. */
|
|
1034
1034
|
readonly facet: string | undefined;
|
|
1035
1035
|
/**
|
|
1036
|
-
* The
|
|
1037
|
-
*
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1036
|
+
* The field a membership filter on this field reads: its own `name`, the
|
|
1037
|
+
* {@link identity} companion of a `local` lookup, or – for an inline
|
|
1038
|
+
* reference naming an {@link ReferenceStrategy.identity identity} – the
|
|
1039
|
+
* nested id leaf of that identity in each entry (`${name}.${leaf}`).
|
|
1040
1040
|
*
|
|
1041
1041
|
* A nested object is not a value an engine filters or facets, so this is the
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1042
|
+
* field it filters and facets in its place. The logical field keeps one name
|
|
1043
|
+
* at the surface; only the physical fanout knows they differ.
|
|
1044
|
+
*/
|
|
1045
|
+
readonly filter: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* The **identity companion** of a {@link ReferenceStrategy.local local}
|
|
1048
|
+
* lookup that is `filterable` or `facetable`: `${name}_id`, a leaf beside the
|
|
1049
|
+
* nested endpoints holding their ids, because an endpoint’s own `id` is a
|
|
1050
|
+
* level further in than a condition on one entry reaches. `undefined` for
|
|
1051
|
+
* every other field.
|
|
1044
1052
|
*/
|
|
1045
1053
|
readonly identity: string | undefined;
|
|
1046
1054
|
/**
|
|
@@ -1074,17 +1082,17 @@ export interface PhysicalFields {
|
|
|
1074
1082
|
readonly end: string;
|
|
1075
1083
|
} | undefined;
|
|
1076
1084
|
}
|
|
1077
|
-
/** The physical name of
|
|
1078
|
-
* {@link
|
|
1085
|
+
/** The physical name of a {@link ReferenceStrategy.local local} lookup’s
|
|
1086
|
+
* {@link PhysicalFields.identity identity companion}. */
|
|
1079
1087
|
export declare function identityFieldName(name: string): string;
|
|
1080
1088
|
/**
|
|
1081
1089
|
* The Root Types whose labels a reference’s **facet buckets** read, by name and
|
|
1082
1090
|
* in order of precedence – its own label sources, or, for an inline reference,
|
|
1083
|
-
* those its {@link ReferenceStrategy.identity identity
|
|
1091
|
+
* those its {@link ReferenceStrategy.identity identity} points at.
|
|
1084
1092
|
* Empty for a field that labels no bucket.
|
|
1085
1093
|
*
|
|
1086
1094
|
* The same one-level-in reading {@link inheritedFacetPolicies} makes, and for
|
|
1087
|
-
* the same reason: the
|
|
1095
|
+
* the same reason: the facet counts that field’s ids, so the types that
|
|
1088
1096
|
* name those ids are the types that can label them. Kept together with it so a
|
|
1089
1097
|
* facet cannot inherit a policy from one type and its labels from another –
|
|
1090
1098
|
* or, as happened first, inherit the policy and no labels at all.
|
|
@@ -1109,7 +1117,7 @@ export declare function localLookupTargetsOf(field: SearchField, schema: SearchS
|
|
|
1109
1117
|
export declare function holdsNoIds(field: SearchField, schema: SearchSchema | undefined): boolean;
|
|
1110
1118
|
/**
|
|
1111
1119
|
* The nested reference an inline reference’s
|
|
1112
|
-
* {@link ReferenceStrategy.identity identity
|
|
1120
|
+
* {@link ReferenceStrategy.identity identity} names, or
|
|
1113
1121
|
* `undefined` where the field declares none (or the schema cannot resolve its
|
|
1114
1122
|
* reference type). The one reading of *which nested field identifies the edge*,
|
|
1115
1123
|
* so the projection (which harvests it), {@link inheritedFacetPolicies} (which
|
|
@@ -1417,14 +1425,16 @@ export declare function storableUnixSeconds(seconds: number): number | undefined
|
|
|
1417
1425
|
* localized `text` field’s display fields are pattern-based and not enumerated
|
|
1418
1426
|
* here – see {@link displayFieldName} and its siblings.
|
|
1419
1427
|
*
|
|
1420
|
-
* The facet
|
|
1421
|
-
* field storing a nested object facets
|
|
1422
|
-
* rather than itself
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* `
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1428
|
+
* The filter and facet are the members that depend on more than the
|
|
1429
|
+
* declaration. A field storing a nested object filters and facets an id leaf
|
|
1430
|
+
* rather than itself – a local lookup its `${name}_id` companion, an inline
|
|
1431
|
+
* reference its identity’s leaf inside each entry – and a facetable reference
|
|
1432
|
+
* whose target declares a {@link FacetKeys facet policy} facets a top-level
|
|
1433
|
+
* `_facet` companion instead: `${name}_facet`, or `${name}_id_facet` for a
|
|
1434
|
+
* local lookup. Only the `schema` can resolve any of these
|
|
1435
|
+
* ({@link inheritedFacetPolicies}). Without one the field filters and facets
|
|
1436
|
+
* its own name – the same reading the projection makes without a schema,
|
|
1437
|
+
* where it cannot re-key a reference either.
|
|
1428
1438
|
*/
|
|
1429
1439
|
export declare function physicalFields(field: SearchField, schema?: SearchSchema): PhysicalFields;
|
|
1430
1440
|
/** The value companions a field stores beside its own name: a `date`’s
|
|
@@ -1447,8 +1457,8 @@ export declare function companionNames(field: SearchField): string[];
|
|
|
1447
1457
|
* companion) and {@link physicalFields} (which names it) share.
|
|
1448
1458
|
*
|
|
1449
1459
|
* An **inline** reference names its target one level in, through the nested
|
|
1450
|
-
* reference its {@link ReferenceStrategy.identity identity
|
|
1451
|
-
* ({@link identityFieldOf}). The boundary is the same one: the
|
|
1460
|
+
* reference its {@link ReferenceStrategy.identity identity} names
|
|
1461
|
+
* ({@link identityFieldOf}). The boundary is the same one: the facet counts
|
|
1452
1462
|
* that field’s ids, so the policy that narrows a facet over those ids is the
|
|
1453
1463
|
* policy of the type that field names. Reading it through the nested field
|
|
1454
1464
|
* rather than declaring it twice is what keeps *which of a type’s ids deserve
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -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,GACjB,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,GACN,QAAQ,GACR,WAAW,CAAC;AAEhB;oEACoE;AACpE,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAAC;AAenD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,iBAAiB,CAAC;CAClC,GAAG,cAAc,GAAG,SAAS,CAI7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,YAAY,GACZ,cAAc,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,KAAK,IAAI,aAAa,CAOtE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CA6CpE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,aAAa,GACvB,MAAM,CAyBR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAsBvD;AAED;;;;;wCAKwC;AACxC,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAClC,IAAI,EAAE,KAAK,GAAG,KAAK,GAClB,MAAM,GAAG,MAAM,GAAG,SAAS,CAY7B;AAED;;sCAEsC;AACtC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvE;AAsGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,YAAY,GACpB,cAAc,CA4DhB;AAED;;mBAEmB;AACnB,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE,CAa3D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,GAAG,SAAS,GAC/B,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAiBhC"}
|
package/dist/schema.js
CHANGED
|
@@ -187,8 +187,8 @@ export function isInlineReference(field) {
|
|
|
187
187
|
* Role is a reading device, pruned before the writer
|
|
188
188
|
* ({@link isInternalField}), while one that is `filterable` or `facetable`
|
|
189
189
|
* without being `output` still has its entries stored – they are what a nested
|
|
190
|
-
* filter constrains and what
|
|
191
|
-
* {@link ReferenceStrategy.identity identity
|
|
190
|
+
* filter constrains and what a
|
|
191
|
+
* {@link ReferenceStrategy.identity identity} is filtered and faceted on. Only
|
|
192
192
|
* `output` decides whether they are *surfaced*, which is the surfaces’ own
|
|
193
193
|
* question ({@link outputFields}).
|
|
194
194
|
*
|
|
@@ -378,15 +378,15 @@ function assertResolvableInlineReferences(types, referenceTypes) {
|
|
|
378
378
|
}
|
|
379
379
|
// An inline reference’s stored value is a nested object, which an engine
|
|
380
380
|
// can neither tokenize for free text nor order by. `filterable` and
|
|
381
|
-
// `facetable` it CAN serve – through
|
|
382
|
-
//
|
|
381
|
+
// `facetable` it CAN serve – through its identity’s leaf below – so only
|
|
382
|
+
// the roles no leaf could answer are refused here.
|
|
383
383
|
const extraRoles = unserviceableInlineRoles(field);
|
|
384
384
|
if (extraRoles.length > 0) {
|
|
385
385
|
throw new Error(`Inline reference “${searchType.name}.${field.name}” declares ${extraRoles
|
|
386
386
|
.map((role) => `“${role}”`)
|
|
387
387
|
.join(', ')}, which it cannot serve: its value is a nested object, not a token an engine can search, sort or join on.`);
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
assertIdentity(searchType, field, referenceType);
|
|
390
390
|
assertFacetedLeaves(searchType, field, referenceType);
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -436,20 +436,20 @@ function assertLiteralField(referenceType) {
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
/**
|
|
439
|
-
* An inline reference’s {@link ReferenceStrategy.identity identity
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
439
|
+
* An inline reference’s {@link ReferenceStrategy.identity identity} holds
|
|
440
|
+
* together in both directions: `facetable` needs an `identity` to point the
|
|
441
|
+
* engine at, and an `identity` with neither Role is a leaf nothing reads.
|
|
442
|
+
* `filterable` without one is served by conditions welded to one entry alone,
|
|
443
|
+
* so it needs a filterable field on the entry instead.
|
|
444
444
|
*
|
|
445
445
|
* The named field must be a nested **reference that names a target** – a
|
|
446
446
|
* `lookup`’s `target` or an `idOnly`’s `labelSource` – because naming one is
|
|
447
|
-
* exactly the claim the
|
|
447
|
+
* exactly the claim the identity rests on: *these values are ids of documents
|
|
448
448
|
* in that collection* (ADR 20). That the target resolves to a declared Root
|
|
449
449
|
* Type needs no rule here: {@link assertResolvableLabelSources} walks Reference
|
|
450
450
|
* Types too, so the nested reference this names is resolved with every other.
|
|
451
451
|
*/
|
|
452
|
-
function
|
|
452
|
+
function assertIdentity(searchType, field, referenceType) {
|
|
453
453
|
const where = `Inline reference “${searchType.name}.${field.name}”`;
|
|
454
454
|
const identity = field.ref.identity;
|
|
455
455
|
const filters = field.filterable === true || field.facetable === true;
|
|
@@ -478,15 +478,15 @@ function assertIdentityCompanion(searchType, field, referenceType) {
|
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
if (!filters) {
|
|
481
|
-
throw new Error(`${where} declares an “identity” but neither “filterable” nor “facetable”: the
|
|
481
|
+
throw new Error(`${where} declares an “identity” but neither “filterable” nor “facetable”: the leaf it names would be indexed and never read. Declare a Role for it, or drop the “identity”.`);
|
|
482
482
|
}
|
|
483
|
-
//
|
|
484
|
-
//
|
|
485
|
-
//
|
|
486
|
-
//
|
|
487
|
-
//
|
|
483
|
+
// The identity’s leaf is one level in from the Root Type, which is as deep as
|
|
484
|
+
// a facet counts documents and a condition on one entry reaches. Inside a
|
|
485
|
+
// Reference Type it would be two levels in. An edge nested inside another
|
|
486
|
+
// edge is not a shape anything has needed; refusing it is better than
|
|
487
|
+
// serving it wrong.
|
|
488
488
|
if (searchType.class === undefined) {
|
|
489
|
-
throw new Error(`${where} declares an “identity”, but “${searchType.name}” is a reference type:
|
|
489
|
+
throw new Error(`${where} declares an “identity”, but “${searchType.name}” is a reference type: a filter and a facet read the identity one level in from a Root Type, and inside a reference type it would be two. Declare the identity on the reference that carries this type.`);
|
|
490
490
|
}
|
|
491
491
|
const identityField = fieldNamed(referenceType, identity);
|
|
492
492
|
if (identityField === undefined) {
|
|
@@ -494,7 +494,12 @@ function assertIdentityCompanion(searchType, field, referenceType) {
|
|
|
494
494
|
}
|
|
495
495
|
if (identityField.kind !== 'reference' ||
|
|
496
496
|
labelSourceNamesOf(identityField).length === 0) {
|
|
497
|
-
throw new Error(`${where} names identity “${identity}”, which names no target: an identity
|
|
497
|
+
throw new Error(`${where} names identity “${identity}”, which names no target: an identity holds ids of documents in a collection, so the field it names must be a reference declaring a “lookup” target or a label source.`);
|
|
498
|
+
}
|
|
499
|
+
// A filter and a facet on the reference read this field’s leaf inside each
|
|
500
|
+
// entry, which the engine indexes only for a field with a query Role.
|
|
501
|
+
if (identityField.filterable !== true) {
|
|
502
|
+
throw new Error(`${where} names identity “${identity}”, which is not “filterable”: the reference filters and facets on that field inside each entry, so it must be indexed. Declare “filterable” on “${field.ref.typeName}.${identity}”.`);
|
|
498
503
|
}
|
|
499
504
|
// An endpoint stated without its edge carries the identity field alone, so
|
|
500
505
|
// any other required field would be missing from it, dropping the document.
|
|
@@ -681,8 +686,8 @@ function assertNoInlineCycle(referenceType, referenceTypes, onPath) {
|
|
|
681
686
|
* a bucket counts every entry of every matching document, including the
|
|
682
687
|
* entries that did not satisfy the filter. The count is therefore wrong in a
|
|
683
688
|
* way no work on our side recovers. Facet a qualified edge through its
|
|
684
|
-
* {@link ReferenceStrategy.identity identity
|
|
685
|
-
*
|
|
689
|
+
* Root Type’s reference and its {@link ReferenceStrategy.identity identity},
|
|
690
|
+
* which counts documents.
|
|
686
691
|
* - **`sortable`** – there is no such thing as sorting *into* an element of an
|
|
687
692
|
* array; a document holds many entries and a sort key is one value.
|
|
688
693
|
*
|
|
@@ -713,7 +718,7 @@ function assertServiceableNestedFields(referenceTypes) {
|
|
|
713
718
|
if (unserviceable.length > 0) {
|
|
714
719
|
throw new Error(`Nested field “${referenceType.name}.${field.name}” declares ${unserviceable
|
|
715
720
|
.map((role) => `“${role}”`)
|
|
716
|
-
.join(', ')}, which nesting cannot serve: an engine facets a nested field per document rather than per entry, sorts on one value rather than into an array, and has no collection to join to from inside an entry. Facet the edge through the inline reference’s “identity
|
|
721
|
+
.join(', ')}, which nesting cannot serve: an engine facets a nested field per document rather than per entry, sorts on one value rather than into an array, and has no collection to join to from inside an entry. Facet the edge through the inline reference’s “identity”, or the root document on this leaf through the reference’s “facetedLeaves”, instead.`);
|
|
717
722
|
}
|
|
718
723
|
if (field.labelSource !== undefined) {
|
|
719
724
|
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.`);
|
|
@@ -755,7 +760,7 @@ const UNSERVICEABLE_NESTED_ROLES = [
|
|
|
755
760
|
/** The Roles the **inline reference itself** declares that it cannot serve, in
|
|
756
761
|
* declaration order. Its value is a nested object, which an engine can neither
|
|
757
762
|
* tokenize for free text nor order by; `filterable` and `facetable` it serves
|
|
758
|
-
* through its {@link ReferenceStrategy.identity identity
|
|
763
|
+
* through its {@link ReferenceStrategy.identity identity}. */
|
|
759
764
|
function unserviceableInlineRoles(field) {
|
|
760
765
|
return UNSERVICEABLE_INLINE_ROLES.filter((role) => role === 'searchable'
|
|
761
766
|
? field.searchable !== undefined
|
|
@@ -837,8 +842,8 @@ export function referencedTargetsOf(field, schema) {
|
|
|
837
842
|
* Reference Types are walked too, so a **nested** `lookup` has its `target`
|
|
838
843
|
* resolved by the same pass a top-level one does. That is also what validates
|
|
839
844
|
* the target behind an inline reference’s
|
|
840
|
-
* {@link ReferenceStrategy.identity identity
|
|
841
|
-
*
|
|
845
|
+
* {@link ReferenceStrategy.identity identity}, since the identity names a
|
|
846
|
+
* nested reference that names one.
|
|
842
847
|
*/
|
|
843
848
|
function assertResolvableLabelSources(types, schema) {
|
|
844
849
|
for (const searchType of types) {
|
|
@@ -1387,19 +1392,19 @@ export function assertValidSearchType(searchType) {
|
|
|
1387
1392
|
throw new Error(`Invalid search type “${searchType.name}”: ${detail}.`);
|
|
1388
1393
|
}
|
|
1389
1394
|
}
|
|
1390
|
-
/** The physical name of
|
|
1391
|
-
* {@link
|
|
1395
|
+
/** The physical name of a {@link ReferenceStrategy.local local} lookup’s
|
|
1396
|
+
* {@link PhysicalFields.identity identity companion}. */
|
|
1392
1397
|
export function identityFieldName(name) {
|
|
1393
1398
|
return `${name}_id`;
|
|
1394
1399
|
}
|
|
1395
1400
|
/**
|
|
1396
1401
|
* The Root Types whose labels a reference’s **facet buckets** read, by name and
|
|
1397
1402
|
* in order of precedence – its own label sources, or, for an inline reference,
|
|
1398
|
-
* those its {@link ReferenceStrategy.identity identity
|
|
1403
|
+
* those its {@link ReferenceStrategy.identity identity} points at.
|
|
1399
1404
|
* Empty for a field that labels no bucket.
|
|
1400
1405
|
*
|
|
1401
1406
|
* The same one-level-in reading {@link inheritedFacetPolicies} makes, and for
|
|
1402
|
-
* the same reason: the
|
|
1407
|
+
* the same reason: the facet counts that field’s ids, so the types that
|
|
1403
1408
|
* name those ids are the types that can label them. Kept together with it so a
|
|
1404
1409
|
* facet cannot inherit a policy from one type and its labels from another –
|
|
1405
1410
|
* or, as happened first, inherit the policy and no labels at all.
|
|
@@ -1440,7 +1445,7 @@ export function holdsNoIds(field, schema) {
|
|
|
1440
1445
|
}
|
|
1441
1446
|
/**
|
|
1442
1447
|
* The nested reference an inline reference’s
|
|
1443
|
-
* {@link ReferenceStrategy.identity identity
|
|
1448
|
+
* {@link ReferenceStrategy.identity identity} names, or
|
|
1444
1449
|
* `undefined` where the field declares none (or the schema cannot resolve its
|
|
1445
1450
|
* reference type). The one reading of *which nested field identifies the edge*,
|
|
1446
1451
|
* so the projection (which harvests it), {@link inheritedFacetPolicies} (which
|
|
@@ -1459,7 +1464,7 @@ export function identityFieldOf(field, schema) {
|
|
|
1459
1464
|
if (referenceType === undefined) {
|
|
1460
1465
|
return undefined;
|
|
1461
1466
|
}
|
|
1462
|
-
// `
|
|
1467
|
+
// `assertIdentity` guarantees the named field is declared and is a
|
|
1463
1468
|
// reference, so this is a read rather than a search.
|
|
1464
1469
|
return fieldNamed(referenceType, identity);
|
|
1465
1470
|
}
|
|
@@ -2045,14 +2050,16 @@ function deepTimeDate(year) {
|
|
|
2045
2050
|
* localized `text` field’s display fields are pattern-based and not enumerated
|
|
2046
2051
|
* here – see {@link displayFieldName} and its siblings.
|
|
2047
2052
|
*
|
|
2048
|
-
* The facet
|
|
2049
|
-
* field storing a nested object facets
|
|
2050
|
-
* rather than itself
|
|
2051
|
-
*
|
|
2052
|
-
*
|
|
2053
|
-
* `
|
|
2054
|
-
*
|
|
2055
|
-
*
|
|
2053
|
+
* The filter and facet are the members that depend on more than the
|
|
2054
|
+
* declaration. A field storing a nested object filters and facets an id leaf
|
|
2055
|
+
* rather than itself – a local lookup its `${name}_id` companion, an inline
|
|
2056
|
+
* reference its identity’s leaf inside each entry – and a facetable reference
|
|
2057
|
+
* whose target declares a {@link FacetKeys facet policy} facets a top-level
|
|
2058
|
+
* `_facet` companion instead: `${name}_facet`, or `${name}_id_facet` for a
|
|
2059
|
+
* local lookup. Only the `schema` can resolve any of these
|
|
2060
|
+
* ({@link inheritedFacetPolicies}). Without one the field filters and facets
|
|
2061
|
+
* its own name – the same reading the projection makes without a schema,
|
|
2062
|
+
* where it cannot re-key a reference either.
|
|
2056
2063
|
*/
|
|
2057
2064
|
export function physicalFields(field, schema) {
|
|
2058
2065
|
if (field.kind === 'text') {
|
|
@@ -2066,30 +2073,37 @@ export function physicalFields(field, schema) {
|
|
|
2066
2073
|
: [],
|
|
2067
2074
|
// Text is never facetable (`validateSearchType`).
|
|
2068
2075
|
facet: undefined,
|
|
2076
|
+
filter: field.name,
|
|
2069
2077
|
identity: undefined,
|
|
2070
2078
|
precision: undefined,
|
|
2071
2079
|
period: undefined,
|
|
2072
2080
|
};
|
|
2073
2081
|
}
|
|
2074
2082
|
// A field storing a nested OBJECT cannot be filtered or faceted as itself, so
|
|
2075
|
-
//
|
|
2076
|
-
//
|
|
2077
|
-
// companion
|
|
2078
|
-
//
|
|
2079
|
-
//
|
|
2080
|
-
const
|
|
2081
|
-
(
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
const
|
|
2083
|
+
// what an engine filters and facets for it is an id leaf. A `local` lookup’s
|
|
2084
|
+
// own id is a level further in than a condition on one entry reaches, so it
|
|
2085
|
+
// gets a companion leaf beside the endpoints; an inline reference naming an
|
|
2086
|
+
// `identity` reads that identity’s leaf inside each entry, which Typesense
|
|
2087
|
+
// flattens into one list per document – the count a facet wants.
|
|
2088
|
+
const identity = localLookupTargetsOf(field, schema).length > 0 &&
|
|
2089
|
+
(field.filterable === true || field.facetable === true)
|
|
2090
|
+
? identityFieldName(field.name)
|
|
2091
|
+
: undefined;
|
|
2092
|
+
const identityField = identityFieldOf(field, schema);
|
|
2093
|
+
const filter = identityField === undefined
|
|
2094
|
+
? (identity ?? field.name)
|
|
2095
|
+
: nestedFieldName(field.name, physicalFields(identityField, schema).filter);
|
|
2085
2096
|
return {
|
|
2086
2097
|
search: field.searchable !== undefined ? [`${field.name}_search`] : [],
|
|
2087
2098
|
sort: [],
|
|
2099
|
+
// The narrowed companion is a top-level field even where the filter reads
|
|
2100
|
+
// a nested leaf: it holds the admitted ids of the whole document.
|
|
2088
2101
|
facet: field.facetable !== true
|
|
2089
2102
|
? undefined
|
|
2090
2103
|
: inheritedFacetPolicies(field, schema).size === 0
|
|
2091
|
-
?
|
|
2092
|
-
: `${
|
|
2104
|
+
? filter
|
|
2105
|
+
: `${identity ?? field.name}_facet`,
|
|
2106
|
+
filter,
|
|
2093
2107
|
identity,
|
|
2094
2108
|
precision: field.kind === 'date' ? `${field.name}_precision` : undefined,
|
|
2095
2109
|
period: storesPeriods(field)
|
|
@@ -2134,8 +2148,8 @@ export function companionNames(field) {
|
|
|
2134
2148
|
* companion) and {@link physicalFields} (which names it) share.
|
|
2135
2149
|
*
|
|
2136
2150
|
* An **inline** reference names its target one level in, through the nested
|
|
2137
|
-
* reference its {@link ReferenceStrategy.identity identity
|
|
2138
|
-
* ({@link identityFieldOf}). The boundary is the same one: the
|
|
2151
|
+
* reference its {@link ReferenceStrategy.identity identity} names
|
|
2152
|
+
* ({@link identityFieldOf}). The boundary is the same one: the facet counts
|
|
2139
2153
|
* that field’s ids, so the policy that narrows a facet over those ids is the
|
|
2140
2154
|
* policy of the type that field names. Reading it through the nested field
|
|
2141
2155
|
* rather than declaring it twice is what keeps *which of a type’s ids deserve
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/search",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.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",
|