Skip to content

SOLR-18074 DenseVectorField multi-valued fields / block-join (BACKPORT)#4191

Open
dsmiley wants to merge 5 commits intoapache:branch_9xfrom
dsmiley:copilot/cherry-pick-commit-for-jira
Open

SOLR-18074 DenseVectorField multi-valued fields / block-join (BACKPORT)#4191
dsmiley wants to merge 5 commits intoapache:branch_9xfrom
dsmiley:copilot/cherry-pick-commit-for-jira

Conversation

@dsmiley
Copy link
Contributor

@dsmiley dsmiley commented Mar 6, 2026

https://issues.apache.org/jira/browse/SOLR-18074

back-port to branch_9x
Implemented by GitHub Copilot. It did absolutely everything, including some tricky parts... amazing!

What follows are Copilot's summary:

Cherry-picks commit 949b28e for SOLR-18074 onto branch_9x, enabling multi-valued DenseVectorField support by transparently converting multi-valued vector fields into Lucene block-join child documents at index time.

Changes

Cherry-pick (949b28e) — resolved conflicts

  • NestedUpdateProcessorFactory: Detects multi-valued vector fields at root level and converts each value into a child nested doc under a pseudo-field (NESTED_VECTORS_PSEUDO_FIELD_NAME), removing the original field
  • ChildDocTransformer: Reconstructs multi-valued vectors from nested children back onto the parent doc in search results
  • DenseVectorField / IndexSchema: Minor supporting changes for multi-valued awareness
  • schema-densevector.xml: Added nested doc fields (_root_, _nest_path_), multi-valued vector fields, and dynamic fields for new tests
  • Ref guide: Documents multi-valued dense vector indexing syntax and behavior

branch_9x compatibility fixes

  • Java 11: Replaced instanceof pattern matching (Java 16+) with explicit cast in NestedUpdateProcessorFactory

  • KnnQParser: Ported childrenOf and parents.preFilter parameters from main — required by the new tests but absent on this branch. Uses DiversifyingChildrenFloatKnnVectorQuery / DiversifyingChildrenByteKnnVectorQuery from Lucene (already present in Lucene 9.12.3):

    {!knn f=vector_multivalued topK=3 childrenOf=$allParents parents.preFilter=$someParents}[1,1,1,1]
    
  • ChildDocTransformer: Fixed byte vector extraction to respect BytesRef.offset and BytesRef.length (the original iterated the entire backing array)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@github-actions github-actions bot added documentation Improvements or additions to documentation tests cat:search cat:index cat:schema labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:index cat:schema cat:search documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants