Skip to content

fix(deposits): stop mapping the linked document - #1227

Open
jma wants to merge 1 commit into
rero:stagingfrom
jma:fix/deposits-document-mapping
Open

jma wants to merge 1 commit into
rero:stagingfrom
jma:fix/deposits-document-mapping

Conversation

@jma

@jma jma commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

The deposits are indexed with their linked document resolved, but the mapping declared only document.$ref: the 300 or so fields of the document were mapped dynamically. During the remote reindex of sonar-copy, the shards mapped document._files.size as float and as long at the same time, and the copy stopped.

  • document is no longer mapped dynamically: only $ref and pid are. The whole document stays in the source, which the deposits list reads (metadata.document.pid).
  • No facet or sort of the deposits used these fields. The free text search of the deposits no longer looks into the fields of the linked document.

⚠️ The deposits index must be recreated and reindexed for the mapping to apply.

* Keep the linked document in the source of the deposits, but map only
  its reference and its pid: its 300 or so fields were mapped
  dynamically, and the shards of a reindex mapped some numbers twice,
  as float and long, which stopped the copy.
* The free text search of the deposits no longer looks into the fields
  of the linked document, which no facet or sort used.

:warning: The deposits index must be recreated and reindexed for the
mapping to apply.

Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
@jma
jma marked this pull request as ready for review November 30, 2026 10:55
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ede3dc72-33e1-45a9-8497-b0e265db0a7e
Commits

Reviewing files that changed from the base of the PR and between 708251e and baddfdf.

Files selected for processing: 2

  • sonar/modules/deposits/mappings/os-v2/deposits/deposit-v1.0.0.json
  • tests/ui/deposits/test_deposits_api.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@jma
jma requested review from PascalRepond and rerowep November 30, 2026 10:55

@PascalRepond PascalRepond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partly linked to the following issues : #1014 & #925 ?

This branch has not been deployed

No deployments
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.

2 participants