Skip to content

SOLR-18034: Add index-time nested vector expansion tests#4160

Open
arup-chauhan wants to merge 1 commit intoapache:mainfrom
arup-chauhan:nested-vector-indexing
Open

SOLR-18034: Add index-time nested vector expansion tests#4160
arup-chauhan wants to merge 1 commit intoapache:mainfrom
arup-chauhan:nested-vector-indexing

Conversation

@arup-chauhan
Copy link
Copy Markdown
Contributor

Description

This PR adds focused index-time test coverage for SOLR-18034 to validate how nested vector documents are constructed from multi-valued dense vectors.

The goal here is to make the existing behavior explicit and regression-safe before any broader lifecycle work.

Context from issue discussion

Issue: SOLR-18034

From the discussion, the scope is server-side indexing assistance for parent/child modeling of nested vectors (aligned with nested-vector direction from SOLR-17736, while avoiding overlap with broader multi-valued vector/query-time scope in SOLR-18074

This PR is intentionally scoped as PR-1: index-time behavior validation.

Changes

  • Added test coverage to assert that a parent document with a multi-valued dense vector field is expanded into nested children (one vector per child) during update
    processing.
  • Added assertions for generated child metadata and structure:
    • child id format
    • _nest_parent_
    • _nest_path_
    • parent field cleanup when expansion occurs
  • Added complementary coverage to assert that a single-valued dense vector field remains on the parent and does not trigger nested-vector expansion.

Behavior / Safety

  • No new runtime feature wiring or query behavior was introduced in this PR.
  • Compatibility boundary:
    • Multi-valued dense vectors: existing expansion behavior is now explicitly verified by tests.
    • Single-valued dense vectors: existing fallback behavior remains unchanged (stays on parent, no generated nested vector children).
  • Risk boundary is low: this is test/schema coverage only, intended to reduce regression risk for existing logic.

Validation

Executed and passing:

  • ./gradlew :solr:core:test --tests org.apache.solr.update.TestNestedUpdateProcessor
  • ./gradlew tidy
  • ./gradlew check -x test

Result: all commands completed successfully for this branch.

Follow-ups

Planned next step (PR-2), based on maintainer feedback:

  • lifecycle safety work (delete/update consistency for generated vector children),
  • integration coverage for parent-child lifecycle behavior,
  • small doc updates if behavior/user guidance needs clarification.

@arup-chauhan
Copy link
Copy Markdown
Contributor Author

arup-chauhan commented Feb 23, 2026

Hello everyone.

This PR is for the index-time part of SOLR-18034 (test coverage validating multivalued dense vector expansion into nested children)

Scope is intentionally narrow: this does not introduce new query-time behavior and keeps single-valued vector behavior unchanged, so risk is low, and boundaries stay aligned with related issues.

If this split looks good, I’ll proceed with the follow-up lifecycle-safety work in a second PR.
Also, I’ll add the changelog entry once this work is approved.

@github-actions
Copy link
Copy Markdown

This PR has had no activity for 60 days and is now labeled as stale. Any new activity will remove the stale label. To attract more reviewers, please tag people who might be familiar with the code area and/or notify the dev@solr.apache.org mailing list. To exempt this PR from being marked as stale, make it a draft PR or add the label "exempt-stale". If left unattended, this PR will be closed after another 60 days of inactivity. Thank you for your contribution!

@github-actions github-actions Bot added the stale PR not updated in 60 days label Apr 25, 2026
@arup-chauhan
Copy link
Copy Markdown
Contributor Author

@epugh, I hope you are doing well. Just wanted to bring attention to this one.

This is the follow-up for the test coverage of the nested logic issue.
Just wanted to holistically cover the whole case :)

P.S: We talked about this on Slack. I have talked about bringing attention to this via the mailing list.

@epugh
Copy link
Copy Markdown
Contributor

epugh commented Apr 26, 2026

@dsmiley i wanted to make sure you saw this? You have deeper knowledge in how parent child works!!!

@github-actions github-actions Bot removed the stale PR not updated in 60 days label Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants