Jan Høydahl created SOLR-18723:
----------------------------------
Summary: Deprecate anonymous child documents in update requests
(JSON _childDocuments_, XML nested <doc>)
Key: SOLR-18723
URL: https://issues.apache.org/jira/browse/SOLR-18723
Project: Solr
Issue Type: Improvement
Components: update
Reporter: Jan Høydahl
Assignee: Jan Høydahl
🤖 AI Assisted
Anonymous child documents are documented as "not recommended" but are not
deprecated. Labelled children ({{"comments":[\{…\}]}}, or {{<field
name="comments"><doc>…</doc></field>}} in XML) cover the same use cases.
h3. Problems
* Anonymous children have no {{_nest_path_}}. {{[child]}} returns them as a
flat list, and descendant-aware delete-by-query (Solr 10) does not find them.
* A second, special syntax next to labelled children: the reserved key
{{_childDocuments_}} in JSON, and a {{<doc>}} directly inside a {{<doc>}} in
XML.
h3. Proposal
* 10.x: deprecate the anonymous forms in update requests. One-time deprecation
log when Solr receives them (JSON, XML, javabin, CBOR).
* Ref guide: mark "Indexing Anonymous Children" deprecated and show the
labelled equivalent.
* SolrJ {{addChildDocument(s)}} is handled in SOLR-18173.
* Out of scope: {{_childDocuments_}} in responses for documents without a nest
path.
h3. Open question: what happens in 11?
* (a) Reject anonymous children with 400, or
* (b) index them as labelled children under the name {{_childDocuments_}} (as
suggested in SOLR-18173). They get a nest path and old clients keep working.
Context: SIP-28 (link TBD) and the JSON update API umbrella (TBD).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]