[ 
https://issues.apache.org/jira/browse/SOLR-16183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694611#comment-17694611
 ] 

Thomas Corthals commented on SOLR-16183:
----------------------------------------

The {{name="child"}} on the doc is currently ignored. Your example creates an 
array named {{single_child}} which contains a doc with {{id}} {{{}3{}}}.
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">0</int>
  <lst name="params">
    <str name="q">*:*</str>
    <str name="indent">true</str>
    <str name="fl">id,single_child,[child]</str>
    <str name="q.op">OR</str>
    <str name="fq">id:1</str>
    <str name="wt">xml</str>
    <str name="_">1677597034063</str>
  </lst>
</lst>
<result name="response" numFound="1" start="0" numFoundExact="true">
  <doc>
    <str name="id">1</str>
    <arr name="single_child">
      <doc>
        <str name="id">3</str></doc>
    </arr></doc>
</result>
</response> {code}
I wouldn't change that behaviour because that would break backward 
compatibility.

> XML Loader: support indexing single nested child document
> ---------------------------------------------------------
>
>                 Key: SOLR-16183
>                 URL: https://issues.apache.org/jira/browse/SOLR-16183
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Thomas Corthals
>            Priority: Major
>              Labels: newbie
>
> The XML Loader always treats labelled nested children as a "multi-valued 
> pseudo-field", whereas the JSON Loader can also index a single child document 
> as well as an array of 1..n child documents.
> The XML Loader should have a corresponding syntax for a single labelled 
> nested child.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to