Conversation
rjrudin
requested review from
RitaChen609,
jonmille,
ngodugu-marklogic and
rjdew-progress
as code owners
September 29, 2026 14:59
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Source URI matching is inconsistent for view-based filtering and explicit metadata values, causing valid incremental lookups to miss.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds source-URI-based incremental-write matching so relocated documents can still be recognized.
Changes:
- Adds source URI configuration, metadata stamping, and field-index lookup.
- Adds unit and functional coverage for relocation scenarios.
- Adds unrelated GitHub Packages publishing configuration.
| File | Description |
|---|---|
test-app/.../content-database.json |
Adds the source URI field and range index. |
IncrementalWriteTest.java |
Tests source URI stamping with views. |
IncrementalWriteSourceUriKeyNameTest.java |
Tests relocation-based matching. |
IncrementalWriteFilterTest.java |
Tests metadata stamping and preservation. |
IncrementalWriteFromLexiconsFilter.java |
Queries hashes by source URI field. |
IncrementalWriteFilter.java |
Adds configuration and metadata stamping. |
IncrementalWriteConfig.java |
Stores and exposes the source URI key. |
marklogic-client-api/build.gradle |
Adds GitHub Packages publishing support. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Supports a use case where the document to be matched against has had its URI modified since it was ingested.
rjrudin
force-pushed
the
feature/32904-incremental-write-source-uri
branch
from
September 29, 2026 17:58
484ea11 to
6b8b217
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
View results and explicit source metadata can be keyed differently from incoming operations, causing unchanged documents to be rewritten.
Review effort: Balanced
Findings: 2
Open (2)
Resolved since last review (2)
Comment on lines
+369
to
+373
| if (sourceUriKeyName != null && !sourceUriKeyName.trim().isEmpty() | ||
| && !newMetadata.getMetadataValues().containsKey(sourceUriKeyName)) { | ||
| // Only stamp this automatically if the caller hasn't already supplied an explicit value - | ||
| // e.g. via metadata set directly on the incoming write operation. | ||
| newMetadata.getMetadataValues().put(sourceUriKeyName, op.getUri()); |
Comment on lines
+35
to
+36
| if (sourceUriName != null && !sourceUriName.trim().isEmpty()) { | ||
| plan = plan.where(op.cts.fieldRangeQuery(op.xs.string(sourceUriName), op.xs.string("="), op.xs.stringSeq(uris))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Supports a use case where the document to be matched against has had its URI modified since it was ingested.