You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decided by grilling with the maintainer. Each point is what the indexer derives from one crate.
1. Which entities get a row and a search document
Collection, Object, Person, Organisation and SoftwareApplication, when the entity declares the matching LDaC profile in conformsTo. File always, with no profile needed. (Today's recordType rule, kept.)
Everything else (languages, places, unprofiled people) appears only inside the virtual crate of what links to it.
Rejected: Collections/Objects/Files only (loses people and organisations as entities to dodge the shared-entity problem); indexing every contextual entity.
2. The single parent (memberOf)
Collections and objects: pcdm:memberOf, else reverse pcdm:hasMember. The bare memberOf/hasMember spellings are no longer read (point 6).
Files: isPartOf or reverse hasPart, preferring a RepositoryObject.
The "any isPartOf/hasPart" fallbacks no longer apply to non-files.
More than one candidate parent: the first wins, with a warning.
A relative @id and a blank-node @id (_:…) become <crate root id>/<@id>. Blank nodes are new: today they are kept as is and would collide between crates.
An @id that starts with the crate's root id, or is an absolute IRI, is kept. So an absolute IRI in two crates is one shared entity. Storing and deleting those is "How shared entities are stored and deleted" (How shared entities are stored and deleted #72).
4. Licences
Content licence: the entity's own license → the nearest ancestor in the same crate, following the parent from point 2 → the crate root → the configured default. The ancestor step is new.
Metadata licence: the crate's metadata descriptor license, else the configured default, for every entity in the crate.
A crate where either can't be resolved is skipped with a warning, as today.
One step takes a crate and produces, per entity, everything both indexes need: id, name, description, type, parent, rootCollection, licences, virtual crate, file details and search fields. It doesn't touch Postgres or OpenSearch.
The database index and the search index are two writers of that result. The search indexer no longer reads rows back to learn rootCollection, and each problem with a crate is logged once.
Crates are assumed to use the current, prefixed spelling: ldac:communicationMode, pcdm:memberOf. These are the forms Oni (crate-works/oni) reads from Metadata.
The indexer reads LDaC and PCDM properties only in that spelling. The older context-only spelling (communicationMode, memberOf, hasMember) is not read, and nothing warns about it.
The virtual crate serves property names as deposited. Nothing is renamed or merged, and the @context is not touched.
A crate still on the older spelling is indexed without those properties: no parent from a bare memberOf/hasMember, nothing in the matching search facets, and Oni doesn't show the values. Updating the crate is its owner's job.
Changed 2026-11-17 by the maintainer after talking it over outside this ticket. The first resolution read either spelling and rewrote the virtual crate to the prefixed forms; it is in this comment's edit history.
7. File entities the repository doesn't hold (metadata-only crates, e.g. COOEE)
The entity gets its row and document as normal (ADR 0003).
It gets a File row with no storage location in meta, so arocapi answers 404 for its content. size is the stated contentSize, or 0 when unstated (Oni shows "N/A"; today's -1 shows "-1 B"). mediaType falls back to application/octet-stream.
Its virtual crate gets display: false, which Oni's fileVisibilityField reads to hide the preview and download.
One warning per crate with the count of such files, not an error per file.
Rejected: no File row (the file drops out of the object page's file table and counts); a File row alone (Oni's file page shows a broken preview and a download that lands on 404 JSON).
Evidence: read from arocapi 5.0.0-beta.10 and crate-works/oni @ b3d2591. Neither design throws anywhere. Oni has no "described but not held" state of its own.
8. Where the crate is read from
Always the repository. The one entry point is "index crate <id> in the repository"; Deposit writes to OCFL first, then asks for that.
The parsed crate plus file accessor stays as an internal seam for tests.
For implementation
Check in a running Oni that display: false hides both the preview and the download; this was read from src/composables/fileVisibility.ts, not run.
Today a file with a relative id and missing bytes gets a dangling ocflPath; point 7 replaces that.
Oni's "View" button on the file table reads access.metadata, which arocapi strips from files, so it is always styled disabled (an Oni/arocapi matter, not ours).
Passed on
Whether a restricted file's text goes into the search index: to "The access control rule" (The access control rule #74).
ADR 0004 and the glossary are updated for points 6 and 7 in the linked PR.
Point 6 (spellings) of the resolution above has been reversed, and point 2 changed to match.
Now: crates are assumed to use the prefixed spelling (ldac:communicationMode, pcdm:memberOf). The indexer reads only that, and the virtual crate serves property names as deposited. A crate still on the older bare spelling (communicationMode, memberOf, hasMember) is indexed without those properties; updating it is the crate owner's job.
Before: the indexer read either spelling and rewrote the virtual crate to the prefixed forms.
Why: the maintainer talked it over outside this ticket and decided not to carry support for the older spelling.
The resolution comment is edited in place (the earlier text is in its edit history), the map (#65) line is updated, and ADR 0004 and the glossary are updated in #79.
For implementation: today's code reads both spellings (values in src/indexer/search.ts, memberOf in src/indexer/indexer.ts, pickSingleMemberOf in src/indexer/database.ts), and the test crates under test-data/ use the bare communicationMode and indexableText, so they need moving to the ldac: forms.
Activity
johnf commentedon Nov 17, 2026
Resolution
Decided by grilling with the maintainer. Each point is what the indexer derives from one crate.
1. Which entities get a row and a search document
conformsTo.Filealways, with no profile needed. (Today'srecordTyperule, kept.)2. The single parent (
memberOf)pcdm:memberOf, else reversepcdm:hasMember. The barememberOf/hasMemberspellings are no longer read (point 6).isPartOfor reversehasPart, preferring aRepositoryObject.isPartOf/hasPart" fallbacks no longer apply to non-files.rootCollectionis unchanged (settled in rootCollection follows arocapi: the top-level collection, across distributed crates #60/Align with arocapi 5 and rewrite the README in its terms #63).3. Entity ids
@idand a blank-node@id(_:…) become<crate root id>/<@id>. Blank nodes are new: today they are kept as is and would collide between crates.@idthat starts with the crate's root id, or is an absolute IRI, is kept. So an absolute IRI in two crates is one shared entity. Storing and deleting those is "How shared entities are stored and deleted" (How shared entities are stored and deleted #72).4. Licences
license→ the nearest ancestor in the same crate, following the parent from point 2 → the crate root → the configured default. The ancestor step is new.license, else the configured default, for every entity in the crate.accessControlis derived from the licence is "The access control rule" (The access control rule #74).5. One derivation step
rootCollection, licences, virtual crate, file details and search fields. It doesn't touch Postgres or OpenSearch.rootCollection, and each problem with a crate is logged once.meta(crateId,rocrate,accessControl) and the search field list stay as today. Aggregates for Oni are Oni aggregates: precompute or compute per request #73's call.6. Spellings (
ldac:,pcdm:)ldac:communicationMode,pcdm:memberOf. These are the forms Oni (crate-works/oni) reads from Metadata.communicationMode,memberOf,hasMember) is not read, and nothing warns about it.@contextis not touched.memberOf/hasMember, nothing in the matching search facets, and Oni doesn't show the values. Updating the crate is its owner's job.7. File entities the repository doesn't hold (metadata-only crates, e.g. COOEE)
Filerow with no storage location inmeta, so arocapi answers 404 for its content.sizeis the statedcontentSize, or0when unstated (Oni shows "N/A"; today's-1shows "-1 B").mediaTypefalls back toapplication/octet-stream.display: false, which Oni'sfileVisibilityFieldreads to hide the preview and download.Filerow (the file drops out of the object page's file table and counts); aFilerow alone (Oni's file page shows a broken preview and a download that lands on 404 JSON).crate-works/oni@ b3d2591. Neither design throws anywhere. Oni has no "described but not held" state of its own.8. Where the crate is read from
<id>in the repository"; Deposit writes to OCFL first, then asks for that.For implementation
display: falsehides both the preview and the download; this was read fromsrc/composables/fileVisibility.ts, not run.ocflPath; point 7 replaces that.access.metadata, which arocapi strips from files, so it is always styled disabled (an Oni/arocapi matter, not ours).Passed on
ADR 0004 and the glossary are updated for points 6 and 7 in the linked PR.
docs: the virtual crate is normalised to ldac: and pcdm: spellings
johnf commentedon Nov 17, 2026
ADR 0004 and glossary changes for points 6 and 7: #79 (draft).
johnf commentedon Nov 17, 2026
Point 6 (spellings) of the resolution above has been reversed, and point 2 changed to match.
ldac:communicationMode,pcdm:memberOf). The indexer reads only that, and the virtual crate serves property names as deposited. A crate still on the older bare spelling (communicationMode,memberOf,hasMember) is indexed without those properties; updating it is the crate owner's job.The resolution comment is edited in place (the earlier text is in its edit history), the map (#65) line is updated, and ADR 0004 and the glossary are updated in #79.
For implementation: today's code reads both spellings (
valuesinsrc/indexer/search.ts,memberOfinsrc/indexer/indexer.ts,pickSingleMemberOfinsrc/indexer/database.ts), and the test crates undertest-data/use the barecommunicationModeandindexableText, so they need moving to theldac:forms.