← Back to Pull requests

SOLR-18445 Let /update handler support JSONL / NDJSON #4910

Open
unknown opened this pull request with 232 lines diff across 2 files
View on GitHub
unknown unknown commented on Sep 13, 2026 23:40 UTC
Author

Adds Newline Delimited JSON (ND-JSON / JSON Lines) as an update format.

What it does

  • /update selects the format from Content-Type: application/x-ndjson on both v1 and v2. application/jsonl, application/jsonlines and application/x-jsonlines are accepted as aliases, and v2 /update also honours update.contentType.

  • Adds an /update/ndjson path on v1 and v2, which selects the format regardless of content type.

  • A new NDJsonLoader extends JsonLoader and delegates document mapping to the /update/json/docs machinery.

  • Uses a new Noggit NDJsonParser to stream-parse the format without buffering lines, and to reject malformed ND-JSON with the line number: strict JSON only, exactly one object per line, no enclosing array, no comments. Blank lines are skipped.

  • UTF-8 only; a request declaring another charset gets 415.

  • bin/solr post now sends .jsonl and .ndjson files to /update (they previously went to /update/extract and were indexed as a single Tika blob).

  • Nested JSON is by default flattened to a.b.c field names, but we also support the same split and f params as the JsonLoader to specify whether we want child documents. split must start at /, since each line is already one document.

  • Deprecates sending several whitespace-separated objects to /update/json/docs (changelog entry of type deprecated and an upgrade note under Solr 10.2); the Ref Guide example that showed it is replaced by the new ND-JSON section.
  • What it does not do

  • No update commands. add, delete, commit etc. Use the commit/commitWithin request parameters.

  • No atomic/partial updates, and no srcField.

  • No change to any existing format. /update with application/json, XML, CSV, javabin and CBOR behave as before.
  • https://issues.apache.org/jira/browse/SOLR-18445

    Diff: 232 lines (+174 / -58) across 2 files Reviewer: sigram Review duration: 104823m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.44) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 232 lines diff across 2 files
    0.44
    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%
    40%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.326
    Real PR Conversation Timeline
    1 comments
    "Review active on #4910"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 40.9% 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: 44.1% (MEDIUM) · Higher = larger blast radius
    44.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: 40.9% · Lower = rushed or shallow review
    40.9%
    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: 26% · Safe to merge
    26%
    Repository