@lde/search 0.41.2 → 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/adapter.d.ts +3 -3
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +2 -2
- package/dist/engine.d.ts +10 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +49 -56
- package/dist/query.d.ts +14 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +55 -16
- package/dist/schema.d.ts +94 -34
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +208 -54
- package/package.json +1 -1
package/dist/adapter.d.ts
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
* deployment author declaring a schema and running searches needs none of
|
|
7
7
|
* this; the main entry point carries that (small) authoring surface.
|
|
8
8
|
*/
|
|
9
|
-
export { assertTypeInSchema, physicalFields, irAlias, displayFieldName, displayFieldPattern, displayLangOf, searchableFields, facetableFields, filterableFields, sortableFields, outputFields, isInternalField, isInlineReference, nestedReferenceType, nestedFieldName, localLookupTargetsOf, referencedTargetsOf, storedTargetOf, TARGET_FIELD, holdsNoIds, identityFieldOf, identityFieldName, inheritedFacetPolicies, referenceFields, referenceTypeNamed, endpointFieldOf, rootTypeNamed, inlineFramingDepth, fieldNamed, datasetField, ID_FIELD, AND_KEY, OR_KEY, labelFieldOf, labelFieldNameOf, labelSourceNamesOf, labelTargetNamesOf, literalKindOf, documentKeyOf, DEFAULT_LABEL_FIELD, isRangeFacet, isBinnedRangeFacet, storedFacetRanges, isAbsoluteIri, isoToUnixSeconds, storedRangeBound, lastSecondOf, unixSecondsToIso, isDatePrecision, } from './schema.js';
|
|
10
|
-
export type { PhysicalFields, DatePrecision, StoredDate } from './schema.js';
|
|
9
|
+
export { assertTypeInSchema, physicalFields, irAlias, displayFieldName, displayFieldPattern, displayLangOf, searchableFields, facetableFields, filterableFields, sortableFields, outputFields, isInternalField, isInlineReference, nestedReferenceType, nestedFieldName, localLookupTargetsOf, referencedTargetsOf, storedTargetOf, TARGET_FIELD, facetNamed, facetsOf, holdsNoIds, identityFieldOf, identityFieldName, inheritedFacetPolicies, referenceFields, referenceTypeNamed, endpointFieldOf, rootTypeNamed, inlineFramingDepth, fieldNamed, datasetField, ID_FIELD, AND_KEY, OR_KEY, labelFieldOf, labelFieldNameOf, labelSourceNamesOf, labelTargetNamesOf, literalKindOf, documentKeyOf, DEFAULT_LABEL_FIELD, isRangeFacet, isBinnedRangeFacet, storedFacetRanges, isAbsoluteIri, isoToUnixSeconds, storedRangeBound, lastSecondOf, unixSecondsToIso, isDatePrecision, } from './schema.js';
|
|
10
|
+
export type { FacetDeclaration, PhysicalFields, DatePrecision, StoredDate, } from './schema.js';
|
|
11
11
|
export { missingRequiredFields } from './project.js';
|
|
12
12
|
export { physicalNameTokens } from './physical-name.js';
|
|
13
13
|
export { matchLanguage } from './language.js';
|
|
14
14
|
export { joinGraph, MAX_JOIN_DEPTH } from './join-graph.js';
|
|
15
15
|
export type { JoinGraph } from './join-graph.js';
|
|
16
|
-
export { filterOperatorFor, filterOperator, filterOn, isWelded, isUnsatisfiable, facetSearches, validateQuery, assertValidQuery, resolvePath, pageForOffset, } from './query.js';
|
|
16
|
+
export { filterOperatorFor, filterOperator, filterOn, selectionOf, isWelded, isUnsatisfiable, facetSearches, validateQuery, assertValidQuery, resolvePath, pageForOffset, } from './query.js';
|
|
17
17
|
export type { FacetSearch, FilterOperator, QueryIssue, ResolvedPath, PathFailure, } from './query.js';
|
|
18
18
|
export type { RebuildRequests } from './rebuild.js';
|
|
19
19
|
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/adapter.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* deployment author declaring a schema and running searches needs none of
|
|
7
7
|
* this; the main entry point carries that (small) authoring surface.
|
|
8
8
|
*/
|
|
9
|
-
export { assertTypeInSchema, physicalFields, irAlias, displayFieldName, displayFieldPattern, displayLangOf, searchableFields, facetableFields, filterableFields, sortableFields, outputFields, isInternalField, isInlineReference, nestedReferenceType, nestedFieldName, localLookupTargetsOf, referencedTargetsOf, storedTargetOf, TARGET_FIELD, holdsNoIds, identityFieldOf, identityFieldName, inheritedFacetPolicies, referenceFields, referenceTypeNamed, endpointFieldOf, rootTypeNamed, inlineFramingDepth, fieldNamed, datasetField, ID_FIELD, AND_KEY, OR_KEY, labelFieldOf, labelFieldNameOf, labelSourceNamesOf, labelTargetNamesOf, literalKindOf, documentKeyOf, DEFAULT_LABEL_FIELD, isRangeFacet, isBinnedRangeFacet, storedFacetRanges, isAbsoluteIri, isoToUnixSeconds, storedRangeBound, lastSecondOf, unixSecondsToIso, isDatePrecision, } from './schema.js';
|
|
9
|
+
export { assertTypeInSchema, physicalFields, irAlias, displayFieldName, displayFieldPattern, displayLangOf, searchableFields, facetableFields, filterableFields, sortableFields, outputFields, isInternalField, isInlineReference, nestedReferenceType, nestedFieldName, localLookupTargetsOf, referencedTargetsOf, storedTargetOf, TARGET_FIELD, facetNamed, facetsOf, holdsNoIds, identityFieldOf, identityFieldName, inheritedFacetPolicies, referenceFields, referenceTypeNamed, endpointFieldOf, rootTypeNamed, inlineFramingDepth, fieldNamed, datasetField, ID_FIELD, AND_KEY, OR_KEY, labelFieldOf, labelFieldNameOf, labelSourceNamesOf, labelTargetNamesOf, literalKindOf, documentKeyOf, DEFAULT_LABEL_FIELD, isRangeFacet, isBinnedRangeFacet, storedFacetRanges, isAbsoluteIri, isoToUnixSeconds, storedRangeBound, lastSecondOf, unixSecondsToIso, isDatePrecision, } from './schema.js';
|
|
10
10
|
export { missingRequiredFields } from './project.js';
|
|
11
11
|
export { physicalNameTokens } from './physical-name.js';
|
|
12
12
|
export { matchLanguage } from './language.js';
|
|
13
13
|
export { joinGraph, MAX_JOIN_DEPTH } from './join-graph.js';
|
|
14
|
-
export { filterOperatorFor, filterOperator, filterOn, isWelded, isUnsatisfiable, facetSearches, validateQuery, assertValidQuery, resolvePath, pageForOffset, } from './query.js';
|
|
14
|
+
export { filterOperatorFor, filterOperator, filterOn, selectionOf, isWelded, isUnsatisfiable, facetSearches, validateQuery, assertValidQuery, resolvePath, pageForOffset, } from './query.js';
|
package/dist/engine.d.ts
CHANGED
|
@@ -128,7 +128,15 @@ export interface FacetExtent {
|
|
|
128
128
|
*/
|
|
129
129
|
export type FacetFieldsOf<Type extends SearchType> = RootType extends Type ? string : Extract<Type['fields'][number], {
|
|
130
130
|
readonly facetable: true;
|
|
131
|
-
}>['name']
|
|
131
|
+
}>['name'] | FacetedLeavesOf<Type['fields'][number]>;
|
|
132
|
+
/** The `‹reference›.‹leaf›` facet names an inline reference declares through
|
|
133
|
+
* its faceted leaves (`ref.facetedLeaves`). */
|
|
134
|
+
type FacetedLeavesOf<Field> = Field extends {
|
|
135
|
+
readonly name: infer Name extends string;
|
|
136
|
+
readonly ref: {
|
|
137
|
+
readonly facetedLeaves: readonly (infer Leaf extends string)[];
|
|
138
|
+
};
|
|
139
|
+
} ? `${Name}.${Leaf}` : never;
|
|
132
140
|
/**
|
|
133
141
|
* The output-field-name union of a search type – the keys a {@link ResultDocument}
|
|
134
142
|
* can hold. Like {@link FacetFieldsOf}, degrades to `string` for a widened
|
|
@@ -246,4 +254,5 @@ export interface FacetBucket {
|
|
|
246
254
|
*/
|
|
247
255
|
readonly is?: boolean;
|
|
248
256
|
}
|
|
257
|
+
export {};
|
|
249
258
|
//# sourceMappingURL=engine.d.ts.map
|
package/dist/engine.d.ts.map
CHANGED
|
@@ -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,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;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;;;;;;OAMG;IACH,MAAM,CAAC,CAAC,SAAS,UAAU,CAA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G,WAAW,GAAG,SAAS,CAAC;IAClD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,CAAC,oBAAoB,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED;oCACoC;AACpC,eAAO,MAAM,oBAAoB,EAAE,OAAO,MAEzC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
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,CAA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E,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/query.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SearchSchema, type SearchType } from './schema.js';
|
|
1
|
+
import { type FacetDeclaration, type SearchSchema, type SearchType } from './schema.js';
|
|
2
2
|
import { type JoinGraph } from './join-graph.js';
|
|
3
3
|
/**
|
|
4
4
|
* The engine- and protocol-neutral query IR. Every API surface compiles its
|
|
@@ -223,6 +223,12 @@ export interface FacetSearch {
|
|
|
223
223
|
* reached through a join path is a different axis than the local field of the
|
|
224
224
|
* same name ([ADR 18](../../docs/decisions/0018-filter-across-several-fields-with-one-clause.md)).
|
|
225
225
|
*
|
|
226
|
+
* A condition on a leaf of an inline reference – reached through `on`, or
|
|
227
|
+
* welded to one entry alone – is on the axis `‹reference›.‹leaf›`, which a
|
|
228
|
+
* faceted leaf owns. A weld of several conditions is nobody’s own: it
|
|
229
|
+
* constrains two parts of one entry, as a clause spanning two fields
|
|
230
|
+
* constrains two fields.
|
|
231
|
+
*
|
|
226
232
|
* A default a surface adds to `where` (a valid-only `status`) is a clause
|
|
227
233
|
* like any other: its facet counts across every value and reports the
|
|
228
234
|
* default’s values as selected.
|
|
@@ -372,4 +378,11 @@ export declare function assertValidQuery(query: SearchQuery, searchType: SearchT
|
|
|
372
378
|
* than dividing by zero.
|
|
373
379
|
*/
|
|
374
380
|
export declare function pageForOffset(offset: number, limit: number): number;
|
|
381
|
+
/**
|
|
382
|
+
* The clause that selects one bucket of a facet – the inverse of the axis a
|
|
383
|
+
* facet owns ({@link facetSearches}): `is` on a boolean, `in` on anything
|
|
384
|
+
* else, and for a faceted leaf a condition welded to one entry of the
|
|
385
|
+
* reference it is reached through.
|
|
386
|
+
*/
|
|
387
|
+
export declare function selectionOf(facet: FacetDeclaration, value: string): Filter;
|
|
375
388
|
//# sourceMappingURL=query.d.ts.map
|
package/dist/query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjE;;;;;GAKG;AACH,MAA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, ID_FIELD, holdsNoIds, nestedReferenceType, referencedTargetsOf, storedRangeBound, } from './schema.js';
|
|
1
|
+
import { facetNamed, fieldNamed, filterOperatorFor, ID_FIELD, holdsNoIds, nestedReferenceType, referencedTargetsOf, storedRangeBound, } from './schema.js';
|
|
2
2
|
import { MAX_JOIN_DEPTH } from './join-graph.js';
|
|
3
3
|
/** Whether a criterion welds conditions to one entry ({@link WeldedCriterion}). */
|
|
4
4
|
export function isWelded(criterion) {
|
|
@@ -75,6 +75,12 @@ export function isUnsatisfiable(query) {
|
|
|
75
75
|
* reached through a join path is a different axis than the local field of the
|
|
76
76
|
* same name ([ADR 18](../../docs/decisions/0018-filter-across-several-fields-with-one-clause.md)).
|
|
77
77
|
*
|
|
78
|
+
* A condition on a leaf of an inline reference – reached through `on`, or
|
|
79
|
+
* welded to one entry alone – is on the axis `‹reference›.‹leaf›`, which a
|
|
80
|
+
* faceted leaf owns. A weld of several conditions is nobody’s own: it
|
|
81
|
+
* constrains two parts of one entry, as a clause spanning two fields
|
|
82
|
+
* constrains two fields.
|
|
83
|
+
*
|
|
78
84
|
* A default a surface adds to `where` (a valid-only `status`) is a clause
|
|
79
85
|
* like any other: its facet counts across every value and reports the
|
|
80
86
|
* default’s values as selected.
|
|
@@ -90,13 +96,7 @@ export function facetSearches(query) {
|
|
|
90
96
|
for (const field of facets.filter((field) => owned.has(field))) {
|
|
91
97
|
const own = query.where.filter((_, index) => owners[index] === field);
|
|
92
98
|
const selected = [
|
|
93
|
-
...new Set(own
|
|
94
|
-
.flatMap((filter) => filter.or)
|
|
95
|
-
.flatMap((criterion) => 'in' in criterion
|
|
96
|
-
? criterion.in
|
|
97
|
-
: 'is' in criterion
|
|
98
|
-
? [String(criterion.is)]
|
|
99
|
-
: [])),
|
|
99
|
+
...new Set(own.flatMap((filter) => filter.or).flatMap(selectedValues)),
|
|
100
100
|
];
|
|
101
101
|
searches.push({
|
|
102
102
|
query: {
|
|
@@ -317,13 +317,16 @@ export function validateQuery(query, searchType, schema, joins) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
for (const name of query.facets) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
issues.push({ part: 'facets', field: name, reason: 'unknown-field' });
|
|
323
|
-
}
|
|
324
|
-
else if (field.facetable !== true) {
|
|
325
|
-
issues.push({ part: 'facets', field: name, reason: 'not-facetable' });
|
|
320
|
+
if (facetNamed(searchType, name, schema) !== undefined) {
|
|
321
|
+
continue;
|
|
326
322
|
}
|
|
323
|
+
issues.push({
|
|
324
|
+
part: 'facets',
|
|
325
|
+
field: name,
|
|
326
|
+
reason: fieldNamed(searchType, name) === undefined
|
|
327
|
+
? 'unknown-field'
|
|
328
|
+
: 'not-facetable',
|
|
329
|
+
});
|
|
327
330
|
}
|
|
328
331
|
collectProjectionIssues(query.resolve, [searchType], schema, issues);
|
|
329
332
|
for (const sort of query.orderBy) {
|
|
@@ -452,6 +455,42 @@ function ownedField(filter) {
|
|
|
452
455
|
* facet and simply never drops.
|
|
453
456
|
*/
|
|
454
457
|
function axisOf(criterion) {
|
|
455
|
-
const
|
|
456
|
-
|
|
458
|
+
const path = [...(criterion.on ?? []), criterion.field];
|
|
459
|
+
if (!isWelded(criterion)) {
|
|
460
|
+
return path.join('.');
|
|
461
|
+
}
|
|
462
|
+
// One condition on one leaf selects on that leaf’s axis, the same documents
|
|
463
|
+
// whether read per entry or per document. Several are welded to one entry:
|
|
464
|
+
// like a clause spanning two fields, that constrains no single axis.
|
|
465
|
+
const [only, ...more] = criterion.entry;
|
|
466
|
+
return only !== undefined && more.length === 0
|
|
467
|
+
? [...path, only.field].join('.')
|
|
468
|
+
: undefined;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* The clause that selects one bucket of a facet – the inverse of the axis a
|
|
472
|
+
* facet owns ({@link facetSearches}): `is` on a boolean, `in` on anything
|
|
473
|
+
* else, and for a faceted leaf a condition welded to one entry of the
|
|
474
|
+
* reference it is reached through.
|
|
475
|
+
*/
|
|
476
|
+
export function selectionOf(facet, value) {
|
|
477
|
+
const field = facet.field.name;
|
|
478
|
+
const condition = facet.field.kind === 'boolean'
|
|
479
|
+
? { field, is: value === 'true' }
|
|
480
|
+
: { field, in: [value] };
|
|
481
|
+
return filterOn(facet.reference === undefined
|
|
482
|
+
? condition
|
|
483
|
+
: { field: facet.reference.name, entry: [condition] });
|
|
484
|
+
}
|
|
485
|
+
/** The values a criterion selects: those of an `in` or `is`, looking through a
|
|
486
|
+
* weld – which a facet owns only with one condition ({@link axisOf}). */
|
|
487
|
+
function selectedValues(criterion) {
|
|
488
|
+
if (isWelded(criterion)) {
|
|
489
|
+
return selectedValues(criterion.entry[0]);
|
|
490
|
+
}
|
|
491
|
+
return 'in' in criterion
|
|
492
|
+
? criterion.in
|
|
493
|
+
: 'is' in criterion
|
|
494
|
+
? [String(criterion.is)]
|
|
495
|
+
: [];
|
|
457
496
|
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -209,6 +209,7 @@ export type ReferenceStrategy = {
|
|
|
209
209
|
readonly typeName?: string;
|
|
210
210
|
readonly target?: never;
|
|
211
211
|
readonly identity?: never;
|
|
212
|
+
readonly facetedLeaves?: never;
|
|
212
213
|
} | {
|
|
213
214
|
readonly strategy: 'lookup';
|
|
214
215
|
/**
|
|
@@ -274,6 +275,7 @@ export type ReferenceStrategy = {
|
|
|
274
275
|
*/
|
|
275
276
|
readonly literal?: LiteralKind;
|
|
276
277
|
readonly identity?: never;
|
|
278
|
+
readonly facetedLeaves?: never;
|
|
277
279
|
} | {
|
|
278
280
|
readonly strategy: 'inline';
|
|
279
281
|
readonly typeName: string;
|
|
@@ -286,12 +288,12 @@ export type ReferenceStrategy = {
|
|
|
286
288
|
* the reference type’s own filterable fields.
|
|
287
289
|
*
|
|
288
290
|
* A nested object is not something an engine can filter or facet by id,
|
|
289
|
-
* so
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
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.
|
|
295
297
|
*
|
|
296
298
|
* Declared rather than inferred, because a reference type may carry more
|
|
297
299
|
* than one nested reference and only the schema author knows which one
|
|
@@ -300,12 +302,31 @@ export type ReferenceStrategy = {
|
|
|
300
302
|
* these ids are, which is what a facet policy is inherited through
|
|
301
303
|
* ({@link inheritedFacetPolicies}) and what types the filter at the surface.
|
|
302
304
|
*
|
|
303
|
-
* The
|
|
305
|
+
* The leaf holds ids only, so a facet over it is exact and
|
|
304
306
|
* identity-keyed: an entry whose endpoint the graph named inline – a
|
|
305
307
|
* literal, a blank node – contributes no bucket rather than a bucket
|
|
306
308
|
* keyed on a label, so two endpoints that share a label are never merged.
|
|
307
309
|
*/
|
|
308
310
|
readonly identity?: string;
|
|
311
|
+
/**
|
|
312
|
+
* The `name`s of **leaf fields** of this reference type that the root
|
|
313
|
+
* document is faceted on, each served as the facet
|
|
314
|
+
* `‹reference›.‹leaf›` (GraphQL: `facets { ‹reference› { ‹leaf› } }`).
|
|
315
|
+
*
|
|
316
|
+
* A bucket counts **root documents**, not entries: a work with three
|
|
317
|
+
* reproductions, two under one licence, counts once under that licence.
|
|
318
|
+
* That is the question such a facet answers – *which works have a
|
|
319
|
+
* reproduction I may reuse?* – and it is how an engine counts a value
|
|
320
|
+
* stored under every entry, so the facet reads the nested path itself
|
|
321
|
+
* and needs no companion.
|
|
322
|
+
*
|
|
323
|
+
* Declared on the reference rather than on the leaf because the count
|
|
324
|
+
* is a fact about the root, and a reference type nested from several
|
|
325
|
+
* places may be faceted from one and not another. Each leaf must be
|
|
326
|
+
* `filterable`, so a bucket selects through a condition on one entry
|
|
327
|
+
* ({@link searchSchema} enforces it), and the reference must be too.
|
|
328
|
+
*/
|
|
329
|
+
readonly facetedLeaves?: readonly string[];
|
|
309
330
|
};
|
|
310
331
|
/** The `literal` kinds a declaration may name, checked at runtime for one
|
|
311
332
|
* built outside TypeScript. */
|
|
@@ -780,8 +801,8 @@ export declare function isInlineReference(field: SearchField): field is Referenc
|
|
|
780
801
|
* Role is a reading device, pruned before the writer
|
|
781
802
|
* ({@link isInternalField}), while one that is `filterable` or `facetable`
|
|
782
803
|
* without being `output` still has its entries stored – they are what a nested
|
|
783
|
-
* filter constrains and what
|
|
784
|
-
* {@link ReferenceStrategy.identity identity
|
|
804
|
+
* filter constrains and what a
|
|
805
|
+
* {@link ReferenceStrategy.identity identity} is filtered and faceted on. Only
|
|
785
806
|
* `output` decides whether they are *surfaced*, which is the surfaces’ own
|
|
786
807
|
* question ({@link outputFields}).
|
|
787
808
|
*
|
|
@@ -1006,20 +1027,28 @@ export interface PhysicalFields {
|
|
|
1006
1027
|
/** Per-locale folded sort keys `${name}_sort_${locale}` (localized text,
|
|
1007
1028
|
* `sortable`); a non-localized field sorts on its own `name` field. */
|
|
1008
1029
|
readonly sort: readonly string[];
|
|
1009
|
-
/** The field a facet on this field reads, when `facetable`: the field
|
|
1010
|
-
*
|
|
1011
|
-
* {@link FacetKeys facet policy} admits. `undefined` for a field
|
|
1012
|
-
* 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. */
|
|
1013
1034
|
readonly facet: string | undefined;
|
|
1014
1035
|
/**
|
|
1015
|
-
* The
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
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}`).
|
|
1019
1040
|
*
|
|
1020
1041
|
* A nested object is not a value an engine filters or facets, so this is the
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
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.
|
|
1023
1052
|
*/
|
|
1024
1053
|
readonly identity: string | undefined;
|
|
1025
1054
|
/**
|
|
@@ -1053,17 +1082,17 @@ export interface PhysicalFields {
|
|
|
1053
1082
|
readonly end: string;
|
|
1054
1083
|
} | undefined;
|
|
1055
1084
|
}
|
|
1056
|
-
/** The physical name of
|
|
1057
|
-
* {@link
|
|
1085
|
+
/** The physical name of a {@link ReferenceStrategy.local local} lookup’s
|
|
1086
|
+
* {@link PhysicalFields.identity identity companion}. */
|
|
1058
1087
|
export declare function identityFieldName(name: string): string;
|
|
1059
1088
|
/**
|
|
1060
1089
|
* The Root Types whose labels a reference’s **facet buckets** read, by name and
|
|
1061
1090
|
* in order of precedence – its own label sources, or, for an inline reference,
|
|
1062
|
-
* those its {@link ReferenceStrategy.identity identity
|
|
1091
|
+
* those its {@link ReferenceStrategy.identity identity} points at.
|
|
1063
1092
|
* Empty for a field that labels no bucket.
|
|
1064
1093
|
*
|
|
1065
1094
|
* The same one-level-in reading {@link inheritedFacetPolicies} makes, and for
|
|
1066
|
-
* the same reason: the
|
|
1095
|
+
* the same reason: the facet counts that field’s ids, so the types that
|
|
1067
1096
|
* name those ids are the types that can label them. Kept together with it so a
|
|
1068
1097
|
* facet cannot inherit a policy from one type and its labels from another –
|
|
1069
1098
|
* or, as happened first, inherit the policy and no labels at all.
|
|
@@ -1088,7 +1117,7 @@ export declare function localLookupTargetsOf(field: SearchField, schema: SearchS
|
|
|
1088
1117
|
export declare function holdsNoIds(field: SearchField, schema: SearchSchema | undefined): boolean;
|
|
1089
1118
|
/**
|
|
1090
1119
|
* The nested reference an inline reference’s
|
|
1091
|
-
* {@link ReferenceStrategy.identity identity
|
|
1120
|
+
* {@link ReferenceStrategy.identity identity} names, or
|
|
1092
1121
|
* `undefined` where the field declares none (or the schema cannot resolve its
|
|
1093
1122
|
* reference type). The one reading of *which nested field identifies the edge*,
|
|
1094
1123
|
* so the projection (which harvests it), {@link inheritedFacetPolicies} (which
|
|
@@ -1145,6 +1174,35 @@ export declare function searchableFields(searchType: SearchType): readonly (Sear
|
|
|
1145
1174
|
})[];
|
|
1146
1175
|
/** Fields returned as facet buckets, in declaration order. */
|
|
1147
1176
|
export declare function facetableFields(searchType: SearchType): readonly SearchField[];
|
|
1177
|
+
/**
|
|
1178
|
+
* One facet a Root Type serves: a facetable field of its own, or a leaf of an
|
|
1179
|
+
* inline reference the type is faceted on
|
|
1180
|
+
* ({@link ReferenceStrategy.facetedLeaves}).
|
|
1181
|
+
*/
|
|
1182
|
+
export interface FacetDeclaration {
|
|
1183
|
+
/** The logical name a query asks for and a result files buckets under: the
|
|
1184
|
+
* field’s own name, or `‹reference›.‹leaf›`. */
|
|
1185
|
+
readonly name: string;
|
|
1186
|
+
/** The field whose values the buckets are – the facetable field, or the
|
|
1187
|
+
* faceted leaf. Its kind types the buckets, and its label source labels
|
|
1188
|
+
* them. */
|
|
1189
|
+
readonly field: SearchField;
|
|
1190
|
+
/** The inline reference a faceted leaf is reached through; absent for a
|
|
1191
|
+
* field of the type’s own. */
|
|
1192
|
+
readonly reference?: SearchField;
|
|
1193
|
+
/** The physical field the engine facets ({@link physicalFields}): the field
|
|
1194
|
+
* itself or one of its companions, or the nested path of a leaf. */
|
|
1195
|
+
readonly engineField: string;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* Every facet a Root Type serves, in declaration order: each facetable field,
|
|
1199
|
+
* then each reference’s faceted leaves after it. The one place a logical facet
|
|
1200
|
+
* name is mapped to what an engine facets, so a surface, a validator and an
|
|
1201
|
+
* adapter enumerate the same facets.
|
|
1202
|
+
*/
|
|
1203
|
+
export declare function facetsOf(searchType: SearchType, schema?: SearchSchema): readonly FacetDeclaration[];
|
|
1204
|
+
/** The facet a Root Type serves under `name`, or `undefined`. */
|
|
1205
|
+
export declare function facetNamed(searchType: SearchType, name: string, schema?: SearchSchema): FacetDeclaration | undefined;
|
|
1148
1206
|
/** Fields usable in `where`, in declaration order. */
|
|
1149
1207
|
export declare function filterableFields(searchType: SearchType): readonly SearchField[];
|
|
1150
1208
|
/** Fields publicly selectable in `orderBy`, in declaration order. */
|
|
@@ -1367,14 +1425,16 @@ export declare function storableUnixSeconds(seconds: number): number | undefined
|
|
|
1367
1425
|
* localized `text` field’s display fields are pattern-based and not enumerated
|
|
1368
1426
|
* here – see {@link displayFieldName} and its siblings.
|
|
1369
1427
|
*
|
|
1370
|
-
* The facet
|
|
1371
|
-
* field storing a nested object facets
|
|
1372
|
-
* rather than itself
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1375
|
-
* `
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
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.
|
|
1378
1438
|
*/
|
|
1379
1439
|
export declare function physicalFields(field: SearchField, schema?: SearchSchema): PhysicalFields;
|
|
1380
1440
|
/** The value companions a field stores beside its own name: a `date`’s
|
|
@@ -1397,8 +1457,8 @@ export declare function companionNames(field: SearchField): string[];
|
|
|
1397
1457
|
* companion) and {@link physicalFields} (which names it) share.
|
|
1398
1458
|
*
|
|
1399
1459
|
* An **inline** reference names its target one level in, through the nested
|
|
1400
|
-
* reference its {@link ReferenceStrategy.identity identity
|
|
1401
|
-
* ({@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
|
|
1402
1462
|
* that field’s ids, so the policy that narrows a facet over those ids is the
|
|
1403
1463
|
* policy of the type that field names. Reading it through the nested field
|
|
1404
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,CAI7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;;;;;;;;;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
|
@@ -123,6 +123,7 @@ export function searchSchema(...types) {
|
|
|
123
123
|
referenceTypesBySchema.set(schema, referenceTypes);
|
|
124
124
|
rootTypesBySchema.set(schema, new Map(rootTypes.map((searchType) => [searchType.name, searchType])));
|
|
125
125
|
assertResolvableLabelSources(types, schema);
|
|
126
|
+
assertUnnarrowedFacetedLeaves(rootTypes, schema);
|
|
126
127
|
// Build the join graph eagerly and discard it: it is cached per schema, and
|
|
127
128
|
// building it is what enforces the schema-wide join rules (one joinable
|
|
128
129
|
// reference per target, every target an indexed Root Type, no cycles). A
|
|
@@ -186,8 +187,8 @@ export function isInlineReference(field) {
|
|
|
186
187
|
* Role is a reading device, pruned before the writer
|
|
187
188
|
* ({@link isInternalField}), while one that is `filterable` or `facetable`
|
|
188
189
|
* without being `output` still has its entries stored – they are what a nested
|
|
189
|
-
* filter constrains and what
|
|
190
|
-
* {@link ReferenceStrategy.identity identity
|
|
190
|
+
* filter constrains and what a
|
|
191
|
+
* {@link ReferenceStrategy.identity identity} is filtered and faceted on. Only
|
|
191
192
|
* `output` decides whether they are *surfaced*, which is the surfaces’ own
|
|
192
193
|
* question ({@link outputFields}).
|
|
193
194
|
*
|
|
@@ -377,15 +378,16 @@ function assertResolvableInlineReferences(types, referenceTypes) {
|
|
|
377
378
|
}
|
|
378
379
|
// An inline reference’s stored value is a nested object, which an engine
|
|
379
380
|
// can neither tokenize for free text nor order by. `filterable` and
|
|
380
|
-
// `facetable` it CAN serve – through
|
|
381
|
-
//
|
|
381
|
+
// `facetable` it CAN serve – through its identity’s leaf below – so only
|
|
382
|
+
// the roles no leaf could answer are refused here.
|
|
382
383
|
const extraRoles = unserviceableInlineRoles(field);
|
|
383
384
|
if (extraRoles.length > 0) {
|
|
384
385
|
throw new Error(`Inline reference “${searchType.name}.${field.name}” declares ${extraRoles
|
|
385
386
|
.map((role) => `“${role}”`)
|
|
386
387
|
.join(', ')}, which it cannot serve: its value is a nested object, not a token an engine can search, sort or join on.`);
|
|
387
388
|
}
|
|
388
|
-
|
|
389
|
+
assertIdentity(searchType, field, referenceType);
|
|
390
|
+
assertFacetedLeaves(searchType, field, referenceType);
|
|
389
391
|
}
|
|
390
392
|
}
|
|
391
393
|
for (const searchType of types) {
|
|
@@ -434,20 +436,20 @@ function assertLiteralField(referenceType) {
|
|
|
434
436
|
}
|
|
435
437
|
}
|
|
436
438
|
/**
|
|
437
|
-
* An inline reference’s {@link ReferenceStrategy.identity identity
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
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.
|
|
442
444
|
*
|
|
443
445
|
* The named field must be a nested **reference that names a target** – a
|
|
444
446
|
* `lookup`’s `target` or an `idOnly`’s `labelSource` – because naming one is
|
|
445
|
-
* exactly the claim the
|
|
447
|
+
* exactly the claim the identity rests on: *these values are ids of documents
|
|
446
448
|
* in that collection* (ADR 20). That the target resolves to a declared Root
|
|
447
449
|
* Type needs no rule here: {@link assertResolvableLabelSources} walks Reference
|
|
448
450
|
* Types too, so the nested reference this names is resolved with every other.
|
|
449
451
|
*/
|
|
450
|
-
function
|
|
452
|
+
function assertIdentity(searchType, field, referenceType) {
|
|
451
453
|
const where = `Inline reference “${searchType.name}.${field.name}”`;
|
|
452
454
|
const identity = field.ref.identity;
|
|
453
455
|
const filters = field.filterable === true || field.facetable === true;
|
|
@@ -476,15 +478,15 @@ function assertIdentityCompanion(searchType, field, referenceType) {
|
|
|
476
478
|
return;
|
|
477
479
|
}
|
|
478
480
|
if (!filters) {
|
|
479
|
-
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”.`);
|
|
480
482
|
}
|
|
481
|
-
//
|
|
482
|
-
//
|
|
483
|
-
//
|
|
484
|
-
//
|
|
485
|
-
//
|
|
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.
|
|
486
488
|
if (searchType.class === undefined) {
|
|
487
|
-
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.`);
|
|
488
490
|
}
|
|
489
491
|
const identityField = fieldNamed(referenceType, identity);
|
|
490
492
|
if (identityField === undefined) {
|
|
@@ -492,7 +494,12 @@ function assertIdentityCompanion(searchType, field, referenceType) {
|
|
|
492
494
|
}
|
|
493
495
|
if (identityField.kind !== 'reference' ||
|
|
494
496
|
labelSourceNamesOf(identityField).length === 0) {
|
|
495
|
-
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}”.`);
|
|
496
503
|
}
|
|
497
504
|
// An endpoint stated without its edge carries the identity field alone, so
|
|
498
505
|
// any other required field would be missing from it, dropping the document.
|
|
@@ -503,6 +510,78 @@ function assertIdentityCompanion(searchType, field, referenceType) {
|
|
|
503
510
|
throw new Error(`${where} nests “${field.ref.typeName}”, which declares an “edgeClass” and requires “${requiredOnEdge.name}”: an endpoint the graph states without its edge carries only “${identity}”, so it would never have “${requiredOnEdge.name}”. Drop “required” from “${requiredOnEdge.name}”.`);
|
|
504
511
|
}
|
|
505
512
|
}
|
|
513
|
+
/** The leaf kinds a root document may be faceted on: values a bucket can key
|
|
514
|
+
* on, with no range bins ({@link ReferenceStrategy.facetedLeaves}). */
|
|
515
|
+
const FACETABLE_LEAF_KINDS = new Set([
|
|
516
|
+
'keyword',
|
|
517
|
+
'boolean',
|
|
518
|
+
'reference',
|
|
519
|
+
]);
|
|
520
|
+
/**
|
|
521
|
+
* An inline reference’s {@link ReferenceStrategy.facetedLeaves faceted leaves}
|
|
522
|
+
* each name a single-valued leaf of the type it nests that a condition on one
|
|
523
|
+
* entry can select, so every bucket round-trips into a filter. Only a Root
|
|
524
|
+
* Type’s reference may declare them: the facet is a count of root documents,
|
|
525
|
+
* and a reference type has none.
|
|
526
|
+
*/
|
|
527
|
+
function assertFacetedLeaves(searchType, field, referenceType) {
|
|
528
|
+
const leaves = facetedLeavesOf(field);
|
|
529
|
+
if (leaves.length === 0) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
const where = `Inline reference “${searchType.name}.${field.name}”`;
|
|
533
|
+
if (searchType.class === undefined) {
|
|
534
|
+
throw new Error(`${where} declares “facetedLeaves”, but “${searchType.name}” is a reference type: a faceted leaf counts root documents, and an entry is not one. Declare it on the Root Type’s reference instead.`);
|
|
535
|
+
}
|
|
536
|
+
if (field.facetable === true) {
|
|
537
|
+
throw new Error(`${where} is “facetable” and declares “facetedLeaves”: its facet and its leaves’ facets would both be named after “${field.name}”. Facet the reference or its leaves, not both.`);
|
|
538
|
+
}
|
|
539
|
+
if (field.filterable !== true) {
|
|
540
|
+
throw new Error(`${where} declares “facetedLeaves” without “filterable”: a bucket is selected by a condition on one entry, which the reference must accept. Declare “filterable” on it.`);
|
|
541
|
+
}
|
|
542
|
+
const seen = new Set();
|
|
543
|
+
for (const name of leaves) {
|
|
544
|
+
if (seen.has(name)) {
|
|
545
|
+
throw new Error(`${where} names faceted leaf “${name}” twice.`);
|
|
546
|
+
}
|
|
547
|
+
seen.add(name);
|
|
548
|
+
const leaf = fieldNamed(referenceType, name);
|
|
549
|
+
if (leaf === undefined) {
|
|
550
|
+
throw new Error(`${where} names faceted leaf “${name}”, which “${field.ref.typeName}” does not declare.`);
|
|
551
|
+
}
|
|
552
|
+
const storesObject = isInlineReference(leaf) ||
|
|
553
|
+
(leaf.kind === 'reference' &&
|
|
554
|
+
leaf.ref?.strategy === 'lookup' &&
|
|
555
|
+
leaf.ref.local === true);
|
|
556
|
+
if (!FACETABLE_LEAF_KINDS.has(leaf.kind) ||
|
|
557
|
+
storesObject ||
|
|
558
|
+
literalKindOf(leaf) !== undefined) {
|
|
559
|
+
throw new Error(`${where} names faceted leaf “${name}”, ${storesObject ? 'which stores a nested object' : `a “${leaf.kind}”`}: only a “keyword”, “boolean” or “reference” leaf holding ids keys a bucket.`);
|
|
560
|
+
}
|
|
561
|
+
if (leaf.filterable !== true) {
|
|
562
|
+
throw new Error(`${where} names faceted leaf “${name}”, which is not “filterable”: a bucket selects through a condition on that leaf. Declare “filterable” on “${field.ref.typeName}.${name}”.`);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* A faceted leaf facets its nested path as stored, so a facet policy on the
|
|
568
|
+
* leaf’s target ({@link RootType.facetKeys}) would go unapplied: the buckets
|
|
569
|
+
* would offer ids the policy excludes. Refused until a narrowed companion is
|
|
570
|
+
* written inside each entry.
|
|
571
|
+
*/
|
|
572
|
+
function assertUnnarrowedFacetedLeaves(rootTypes, schema) {
|
|
573
|
+
for (const searchType of rootTypes) {
|
|
574
|
+
for (const facet of facetsOf(searchType, schema)) {
|
|
575
|
+
if (facet.reference === undefined) {
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
578
|
+
const narrowing = referencedTargetsOf(facet.field, schema).find((target) => target.facetKeys !== undefined);
|
|
579
|
+
if (narrowing !== undefined) {
|
|
580
|
+
throw new Error(`Inline reference “${searchType.name}.${facet.reference.name}” names faceted leaf “${facet.field.name}”, whose target “${narrowing.name}” declares “facetKeys”: a faceted leaf cannot be narrowed by a facet policy yet, so its buckets would offer ids the policy excludes.`);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
506
585
|
/**
|
|
507
586
|
* A {@link ReferenceStrategy.local local} lookup stores a nested object rather
|
|
508
587
|
* than an id, so it is held to the same Roles an inline reference is: an engine
|
|
@@ -607,8 +686,8 @@ function assertNoInlineCycle(referenceType, referenceTypes, onPath) {
|
|
|
607
686
|
* a bucket counts every entry of every matching document, including the
|
|
608
687
|
* entries that did not satisfy the filter. The count is therefore wrong in a
|
|
609
688
|
* way no work on our side recovers. Facet a qualified edge through its
|
|
610
|
-
* {@link ReferenceStrategy.identity identity
|
|
611
|
-
*
|
|
689
|
+
* Root Type’s reference and its {@link ReferenceStrategy.identity identity},
|
|
690
|
+
* which counts documents.
|
|
612
691
|
* - **`sortable`** – there is no such thing as sorting *into* an element of an
|
|
613
692
|
* array; a document holds many entries and a sort key is one value.
|
|
614
693
|
*
|
|
@@ -639,7 +718,7 @@ function assertServiceableNestedFields(referenceTypes) {
|
|
|
639
718
|
if (unserviceable.length > 0) {
|
|
640
719
|
throw new Error(`Nested field “${referenceType.name}.${field.name}” declares ${unserviceable
|
|
641
720
|
.map((role) => `“${role}”`)
|
|
642
|
-
.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.`);
|
|
643
722
|
}
|
|
644
723
|
if (field.labelSource !== undefined) {
|
|
645
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.`);
|
|
@@ -681,7 +760,7 @@ const UNSERVICEABLE_NESTED_ROLES = [
|
|
|
681
760
|
/** The Roles the **inline reference itself** declares that it cannot serve, in
|
|
682
761
|
* declaration order. Its value is a nested object, which an engine can neither
|
|
683
762
|
* tokenize for free text nor order by; `filterable` and `facetable` it serves
|
|
684
|
-
* through its {@link ReferenceStrategy.identity identity
|
|
763
|
+
* through its {@link ReferenceStrategy.identity identity}. */
|
|
685
764
|
function unserviceableInlineRoles(field) {
|
|
686
765
|
return UNSERVICEABLE_INLINE_ROLES.filter((role) => role === 'searchable'
|
|
687
766
|
? field.searchable !== undefined
|
|
@@ -763,8 +842,8 @@ export function referencedTargetsOf(field, schema) {
|
|
|
763
842
|
* Reference Types are walked too, so a **nested** `lookup` has its `target`
|
|
764
843
|
* resolved by the same pass a top-level one does. That is also what validates
|
|
765
844
|
* the target behind an inline reference’s
|
|
766
|
-
* {@link ReferenceStrategy.identity identity
|
|
767
|
-
*
|
|
845
|
+
* {@link ReferenceStrategy.identity identity}, since the identity names a
|
|
846
|
+
* nested reference that names one.
|
|
768
847
|
*/
|
|
769
848
|
function assertResolvableLabelSources(types, schema) {
|
|
770
849
|
for (const searchType of types) {
|
|
@@ -1313,19 +1392,19 @@ export function assertValidSearchType(searchType) {
|
|
|
1313
1392
|
throw new Error(`Invalid search type “${searchType.name}”: ${detail}.`);
|
|
1314
1393
|
}
|
|
1315
1394
|
}
|
|
1316
|
-
/** The physical name of
|
|
1317
|
-
* {@link
|
|
1395
|
+
/** The physical name of a {@link ReferenceStrategy.local local} lookup’s
|
|
1396
|
+
* {@link PhysicalFields.identity identity companion}. */
|
|
1318
1397
|
export function identityFieldName(name) {
|
|
1319
1398
|
return `${name}_id`;
|
|
1320
1399
|
}
|
|
1321
1400
|
/**
|
|
1322
1401
|
* The Root Types whose labels a reference’s **facet buckets** read, by name and
|
|
1323
1402
|
* in order of precedence – its own label sources, or, for an inline reference,
|
|
1324
|
-
* those its {@link ReferenceStrategy.identity identity
|
|
1403
|
+
* those its {@link ReferenceStrategy.identity identity} points at.
|
|
1325
1404
|
* Empty for a field that labels no bucket.
|
|
1326
1405
|
*
|
|
1327
1406
|
* The same one-level-in reading {@link inheritedFacetPolicies} makes, and for
|
|
1328
|
-
* the same reason: the
|
|
1407
|
+
* the same reason: the facet counts that field’s ids, so the types that
|
|
1329
1408
|
* name those ids are the types that can label them. Kept together with it so a
|
|
1330
1409
|
* facet cannot inherit a policy from one type and its labels from another –
|
|
1331
1410
|
* or, as happened first, inherit the policy and no labels at all.
|
|
@@ -1366,7 +1445,7 @@ export function holdsNoIds(field, schema) {
|
|
|
1366
1445
|
}
|
|
1367
1446
|
/**
|
|
1368
1447
|
* The nested reference an inline reference’s
|
|
1369
|
-
* {@link ReferenceStrategy.identity identity
|
|
1448
|
+
* {@link ReferenceStrategy.identity identity} names, or
|
|
1370
1449
|
* `undefined` where the field declares none (or the schema cannot resolve its
|
|
1371
1450
|
* reference type). The one reading of *which nested field identifies the edge*,
|
|
1372
1451
|
* so the projection (which harvests it), {@link inheritedFacetPolicies} (which
|
|
@@ -1385,7 +1464,7 @@ export function identityFieldOf(field, schema) {
|
|
|
1385
1464
|
if (referenceType === undefined) {
|
|
1386
1465
|
return undefined;
|
|
1387
1466
|
}
|
|
1388
|
-
// `
|
|
1467
|
+
// `assertIdentity` guarantees the named field is declared and is a
|
|
1389
1468
|
// reference, so this is a read rather than a search.
|
|
1390
1469
|
return fieldNamed(referenceType, identity);
|
|
1391
1470
|
}
|
|
@@ -1451,6 +1530,72 @@ export function searchableFields(searchType) {
|
|
|
1451
1530
|
export function facetableFields(searchType) {
|
|
1452
1531
|
return searchType.fields.filter((field) => field.facetable === true);
|
|
1453
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Every facet a Root Type serves, in declaration order: each facetable field,
|
|
1535
|
+
* then each reference’s faceted leaves after it. The one place a logical facet
|
|
1536
|
+
* name is mapped to what an engine facets, so a surface, a validator and an
|
|
1537
|
+
* adapter enumerate the same facets.
|
|
1538
|
+
*/
|
|
1539
|
+
export function facetsOf(searchType, schema) {
|
|
1540
|
+
if (schema === undefined) {
|
|
1541
|
+
return declaredFacets(searchType, schema);
|
|
1542
|
+
}
|
|
1543
|
+
// Read per facet a query names, on every search: derived once per type.
|
|
1544
|
+
let bySchema = facetsBySchema.get(schema);
|
|
1545
|
+
if (bySchema === undefined) {
|
|
1546
|
+
bySchema = new WeakMap();
|
|
1547
|
+
facetsBySchema.set(schema, bySchema);
|
|
1548
|
+
}
|
|
1549
|
+
const cached = bySchema.get(searchType);
|
|
1550
|
+
if (cached !== undefined) {
|
|
1551
|
+
return cached;
|
|
1552
|
+
}
|
|
1553
|
+
const facets = declaredFacets(searchType, schema);
|
|
1554
|
+
bySchema.set(searchType, facets);
|
|
1555
|
+
return facets;
|
|
1556
|
+
}
|
|
1557
|
+
/** The {@link ReferenceStrategy.facetedLeaves faceted leaves} an inline
|
|
1558
|
+
* reference declares, or none. */
|
|
1559
|
+
function facetedLeavesOf(inlineReference) {
|
|
1560
|
+
return (inlineReference.ref.facetedLeaves ?? []);
|
|
1561
|
+
}
|
|
1562
|
+
const facetsBySchema = new WeakMap();
|
|
1563
|
+
function declaredFacets(searchType, schema) {
|
|
1564
|
+
return searchType.fields.flatMap((field) => {
|
|
1565
|
+
const own = field.facetable === true
|
|
1566
|
+
? [
|
|
1567
|
+
{
|
|
1568
|
+
name: field.name,
|
|
1569
|
+
field,
|
|
1570
|
+
engineField: physicalFields(field, schema).facet,
|
|
1571
|
+
},
|
|
1572
|
+
]
|
|
1573
|
+
: [];
|
|
1574
|
+
const referenceType = schema === undefined ? undefined : nestedReferenceType(schema, field);
|
|
1575
|
+
if (referenceType === undefined) {
|
|
1576
|
+
return own;
|
|
1577
|
+
}
|
|
1578
|
+
// Only an inline reference nests a reference type, and `searchSchema`
|
|
1579
|
+
// has resolved every faceted leaf against it.
|
|
1580
|
+
const leaves = facetedLeavesOf(field);
|
|
1581
|
+
return [
|
|
1582
|
+
...own,
|
|
1583
|
+
...leaves.map((leafName) => {
|
|
1584
|
+
const path = nestedFieldName(field.name, leafName);
|
|
1585
|
+
return {
|
|
1586
|
+
name: path,
|
|
1587
|
+
field: fieldNamed(referenceType, leafName),
|
|
1588
|
+
reference: field,
|
|
1589
|
+
engineField: path,
|
|
1590
|
+
};
|
|
1591
|
+
}),
|
|
1592
|
+
];
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
/** The facet a Root Type serves under `name`, or `undefined`. */
|
|
1596
|
+
export function facetNamed(searchType, name, schema) {
|
|
1597
|
+
return facetsOf(searchType, schema).find((facet) => facet.name === name);
|
|
1598
|
+
}
|
|
1454
1599
|
/** Fields usable in `where`, in declaration order. */
|
|
1455
1600
|
export function filterableFields(searchType) {
|
|
1456
1601
|
return searchType.fields.filter((field) => field.filterable === true);
|
|
@@ -1905,14 +2050,16 @@ function deepTimeDate(year) {
|
|
|
1905
2050
|
* localized `text` field’s display fields are pattern-based and not enumerated
|
|
1906
2051
|
* here – see {@link displayFieldName} and its siblings.
|
|
1907
2052
|
*
|
|
1908
|
-
* The facet
|
|
1909
|
-
* field storing a nested object facets
|
|
1910
|
-
* rather than itself
|
|
1911
|
-
*
|
|
1912
|
-
*
|
|
1913
|
-
* `
|
|
1914
|
-
*
|
|
1915
|
-
*
|
|
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.
|
|
1916
2063
|
*/
|
|
1917
2064
|
export function physicalFields(field, schema) {
|
|
1918
2065
|
if (field.kind === 'text') {
|
|
@@ -1926,30 +2073,37 @@ export function physicalFields(field, schema) {
|
|
|
1926
2073
|
: [],
|
|
1927
2074
|
// Text is never facetable (`validateSearchType`).
|
|
1928
2075
|
facet: undefined,
|
|
2076
|
+
filter: field.name,
|
|
1929
2077
|
identity: undefined,
|
|
1930
2078
|
precision: undefined,
|
|
1931
2079
|
period: undefined,
|
|
1932
2080
|
};
|
|
1933
2081
|
}
|
|
1934
2082
|
// A field storing a nested OBJECT cannot be filtered or faceted as itself, so
|
|
1935
|
-
//
|
|
1936
|
-
//
|
|
1937
|
-
// companion
|
|
1938
|
-
//
|
|
1939
|
-
//
|
|
1940
|
-
const
|
|
1941
|
-
(
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
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);
|
|
1945
2096
|
return {
|
|
1946
2097
|
search: field.searchable !== undefined ? [`${field.name}_search`] : [],
|
|
1947
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.
|
|
1948
2101
|
facet: field.facetable !== true
|
|
1949
2102
|
? undefined
|
|
1950
2103
|
: inheritedFacetPolicies(field, schema).size === 0
|
|
1951
|
-
?
|
|
1952
|
-
: `${
|
|
2104
|
+
? filter
|
|
2105
|
+
: `${identity ?? field.name}_facet`,
|
|
2106
|
+
filter,
|
|
1953
2107
|
identity,
|
|
1954
2108
|
precision: field.kind === 'date' ? `${field.name}_precision` : undefined,
|
|
1955
2109
|
period: storesPeriods(field)
|
|
@@ -1994,8 +2148,8 @@ export function companionNames(field) {
|
|
|
1994
2148
|
* companion) and {@link physicalFields} (which names it) share.
|
|
1995
2149
|
*
|
|
1996
2150
|
* An **inline** reference names its target one level in, through the nested
|
|
1997
|
-
* reference its {@link ReferenceStrategy.identity identity
|
|
1998
|
-
* ({@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
|
|
1999
2153
|
* that field’s ids, so the policy that narrows a facet over those ids is the
|
|
2000
2154
|
* policy of the type that field names. Reading it through the nested field
|
|
2001
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",
|