You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter Pimley <pe...@gmail.com> on 2020/04/03 14:21:01 UTC

Inconsistent / confusing documentation on indexing nested documents.

Hi,

The page "Indexing Nested Documents" has an XML example showing two
different ways of adding nested documents:

https://lucene.apache.org/solr/guide/8_5/indexing-nested-documents.html#xml-examples

The text says:

  "It illustrates two styles of adding child documents: the first is
associated via a field "comment" (preferred), and the second is done
in the classic way now referred to as an "anonymous" or "unlabelled"
child document."

However in the XML directly below there is no field named "comment".
There is one named "content" and another named "comments" (plural),
but no field named "comment".  In fact, looking at the Json example
immediately below, I wonder if the XML element currently named
"content" should be named "comments", and what is currently marked
"comments" should be "content"?

Secondly, in the Json example it says:

  "The labelled relationship here is one child document but could have
been wrapped in array brackets."

However in the actual Json, the parent document (ID=1) with a labelled
relationship has two child documents (IDs 2 and 3), and they are
already in array brackets.

Is the documentation wrong or have I misunderstood it?

Thanks,
Peter

Re: Inconsistent / confusing documentation on indexing nested documents.

Posted by Chris Hostetter <ho...@fucit.org>.
: Is the documentation wrong or have I misunderstood it?

The documentation is definitely wrong, thanks for pointing this out...

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


-Hoss
http://www.lucidworks.com/