← Back to Pull requests

SOLR-18608: Honor glob field selection in real-time get and lazy document prefetch #5298

Open
unknown opened this pull request with 392 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 05, 2026 16:24 UTC
Author

🤖 AI text below 🤖 (reviewed by Nick Shanin)

Draft status is due to Nick Shanin's open-PR cap; the change is complete and ready for review.

Jira: SOLR-18608. Follow-up to SOLR-11364 / PR 5188, now merged.

What happens today

Partial field globs can load unrelated stored values in real-time get and skip lazy prefetch in search.

An index-backed /get with fl=title,other_ falls back to loading all stored fields. A /select with fl=source_ skips prefetch, including the stored-field combination needed for highlighting.

What this change does

Share stored-field selection while preserving the DocValues-only search path.

RTG uses the shared selector for matching stored fields and transformer inputs, then filters cached fields before conversion. Glob prefetch applies the response optimizer's DocValues substitution, adds highlight fields and the unique key, and skips an empty stored set. Explicit-field prefetch and the shard/50-result guards retain their previous behavior.

Proof

Linux tests and checks pass at the current head.

<details>
<summary>Linux verification at a99e40291ae17fbee56b821113cc9bc15659b147</summary>

Verified 2026-11-05 with JDK 21, Gradle 9.7.0 and seed 5298C0DE:

  • BasicFunctionalityTest: 31 passed.

  • TestPseudoReturnFields: 35 passed.

  • TestUnifiedSolrHighlighter: 33 passed.

  • ReturnFieldsTest: 16 passed.

  • TestRetrieveFieldsOptimizer: 1 passed.

  • LargeFieldTest: 1 passed.
  • The six suites total 117 tests with no failures, errors or skips. Nine focused methods and an independent LargeFieldTest run also passed. Root tidy, Error Prone compilation and root check -x test passed; formatting left the tested head unchanged.

    With the final tests overlaid on 7ee68a7000, testGlobNonStoredDocValuesPrefetch, testGlobSubstitutedDocValuesPrefetch and testGlobEmptyPrefetch each fail at the intended Unexpected stored-document prefetch assertion. All pass at this head.

    Test results and root tidy result.

    </details>

    Limits

    The change covers stored-field loading and prefetch.

    RTG DocValues decoration and term-vector selection are unchanged. No full core test suite, repository-wide test run, disk-I/O measurement or latency benchmark was performed. Lazy-wrapper assertions do not establish which backing values Lucene reads on cache hits.

    Changelog: SOLR-18608

    AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.

    Diff: 392 lines (+294 / -98) across 4 files Reviewer: nick-boss-tech Review duration: 31278m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.43) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 392 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.357
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #5298"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.1% (MEDIUM) · Higher = larger blast radius
    43.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.0% · Safe to merge
    23.0%
    Repository