-
- Notifications
You must be signed in to change notification settings - Fork 504
Open
Description
Describe the bug
When using iso19139.ca.HNAP metadata with Directory-based contacts referenced via XLink (local://srv/api/records/.../formatters/xml):
- After Edit -> Validate -> Save, the record is correctly indexed and returns contact / contactForResource fields.
- After Tools -> Reindex, those same fields disappear from search results for the same UUID.
The XML view of the record remains materialized and correct in both cases.
To Reproduce
- Enable XLink in GeoNetwork.
- Create a Directory (subtemplate) record containing a gmd:CI_ResponsibleParty.
- Reference that Directory entry from a metadata record using:
<gmd:contact xlink:type="simple" xlink:href="local://srv/api/records/<uuid>/formatters/xml"/>- Edit -> Validate -> Save the metadata record.1. Query the record via the search API:
{ "size": 1, "_source": { "includes": [ "uuid", "contact", "contactForResource", "contactForDistribution" ] }, "query": { "bool": { "filter": [ { "term": { "uuid": { "value": "<uuid>" } } } ] } } }- Observe that contact and contactForResource fields are present.
- Run Tools -> Reindex.
- Repeat the same _search request.
- Observe that contact, contactForResource, and other contact* fields are now missing.
Observed behavior
- After Save: contact and contactForResource are indexed and returned.
- After Reindex: those fields are absent for the same UUID.
- XML view remains correct and materialized in both cases.
Expected behavior
Reindex should produce the same indexed fields as per-record Save.
contact* fields derived from xlinked Directory entries should be present after rebuild.
Additional context
- This was reproduced using:
- gmd:contact
- contactForResource
- (contactForDistribution intentionally not populated in this test)
- Diagnostic XSL patching shows:
- Save path indexes embedded/materialized CI_ResponsibleParty
- Reindex path sees only the unresolved xlink wrapper (@xLink:href)
- Attempts to resolve the xlink during indexing:
- util:getUrlContent() fails for local:// protocol
- util:getRecord() was not a viable workaround in this indexing context
- This suggests that the rebuild/indexing pipeline does not resolve or materialize local xlinked Directory contacts before applying the indexing XSL, whereas the save path does.
Impact
- Inconsistent search index depending on indexing pathway
- Missing contact metadata in search results after rebuild
- Affects Directory/XLink-based workflows in iso19139.ca.HNAP
Notes
- The issue is reproducible without any custom patches.
- Debug instrumentation was used only to confirm the differing code paths between Save and Reindex.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels