What is _root_ in schema.xml?

I am reading an example of solr schema.xml. And I found a field named _root_ . I've never seen this before. I do not know what he is doing.

 <!-- points to the root document of a block of nested documents. Required for nested document support, may be removed otherwise --> <field name="_root_" type="string" indexed="true" stored="false"/> 

Is this a new feature of solr? What is nested documents ? And for what situation should I use this field?

My version is solr 4.6.

Thanks in advance.

+11
solr
source share
1 answer

The _root_ field _root_ needed to support block merging. See here for a more detailed explanation.

You can use this when you have relationships between entities and you don’t want to smooth your documents, for example, one class document, contains many documents for students, and you want to be able to query in a more similar way, as you would do in traditional relational database.

Be careful, however, that you cannot get all the features and flexibility of a relational database.

+8
source share

All Articles