Skip to content

Fix ambguous alias resolution - #28

Merged
golsch merged 2 commits into
2023.06.xfrom
fix_ambguous_alias_resolution
Oct 22, 2026
Merged

golsch merged 2 commits into
2023.06.xfrom
fix_ambguous_alias_resolution

Conversation

@golsch

@golsch golsch commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Alias parts are indexed per object, not as full paths. When an alias part was used by multiple objects, the servlet resolved the entry point by taking the first Solr hit. For example /publikationen/jahresbericht could resolve to the child qfiab/105-2025/jahresbericht instead of the standalone object with the same alias.

Changes

  • Root check for the first path segment: hits that are linked via host or series to a parent with an alias are skipped, since they are reachable via the alias path of their parent.
    • If no root remains but there is exactly one hit, it is still used, so short alias urls to unique children keep working.
    • Multiple roots are logged as error and resolved deterministically by id.
  • Child lookup only follows host and series: the servlet now searches children via mods.relatedItem.host / mods.relatedItem.series instead of mods.relatedItem.

No schema change and no reindex required, only already indexed fields are used.

@golsch
golsch force-pushed the fix_ambguous_alias_resolution branch from c62ce90 to c913cc8 Compare October 21, 2026 13:05
@golsch
golsch requested a review from sebhofmann October 21, 2026 13:50
@golsch
golsch force-pushed the fix_ambguous_alias_resolution branch from 980571d to 36d0591 Compare October 21, 2026 14:05
@golsch
golsch removed the request for review from sebhofmann October 22, 2026 13:03
@golsch
golsch merged commit 2c9745e into 2023.06.x Oct 22, 2026
1 check passed
@golsch
golsch deleted the fix_ambguous_alias_resolution branch October 22, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant