Skip to content

MLE-32904 Incremental write now supportings matching on a field - #1980

Open
rjrudin wants to merge 1 commit into
developfrom
feature/32904-incremental-write-source-uri
Open

rjrudin wants to merge 1 commit into
developfrom
feature/32904-incremental-write-source-uri

Conversation

@rjrudin

@rjrudin rjrudin commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI 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.

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 High severity · 1 Low severity

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.

Comment thread marklogic-client-api/build.gradle
Supports a use case where the document to be matched against has had its URI modified since it was ingested.
@rjrudin
rjrudin force-pushed the feature/32904-incremental-write-source-uri branch from 484ea11 to 6b8b217 Compare September 29, 2026 17:58
@rjrudin
rjrudin requested a balanced review from Copilot September 29, 2026 18:05

Copilot AI 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.

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 Medium severity

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)));
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