Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
There is a missing field and a missing cache which does not allow indexing nested documents.
Actually, without the field "_root_" we can still index, but when trying to update the index new documents will be created instead of just updating the existing ones.
The nested documents is a new feature introduced at Solr 4.8: http://heliosearch.org/solr-4-8-features/
An example data (in XML) is:
<add>
<doc>
<field name="id">ISBN1_MASTER</field>
<field name="label">Solr On Fire</field>
<field name="bundle">parent</field>
<field name="ss_ISBN">ISBN1</field>
<doc>
<field name="id">ISBN1_page1</field>
<field name="bundle">child</field>
<field name="ss_ISBN">ISBN1</field>
<field name="ss_text">Welcome to Solr On Fire</field>
</doc>
<doc>
<field name="id">ISBN1_page2</field>
<field name="bundle">child</field>
<field name="ss_ISBN">ISBN1</field>
<field name="ss_text">Setting up Solr</field>
</doc>
</doc>
<doc>
<field name="id">ISBN2_MASTER</field>
<field name="label">Mastering Solr</field>
<field name="bundle">parent</field>
<field name="ss_ISBN">ISBN2</field>
<doc>
<field name="id">ISBN2_page1</field>
<field name="bundle">child</field>
<field name="ss_ISBN">ISBN2</field>
<field name="ss_text">Welcome to Mastering Solr</field>
</doc>
<doc>
<field name="id">ISBN2_page2</field>
<field name="bundle">child</field>
<field name="ss_ISBN">ISBN2</field>
<field name="ss_text">Setting up Solr Masterfully</field>
</doc>
</doc>
</add>
Proposed resolution
Add the field "_root_" and add cache for nested documents.
Remaining tasks
patch to be submitted
User interface changes
none
API changes
none
Comment | File | Size | Author |
---|---|---|---|
#1 | apachesolr-support_solr4_8_nested_docs-2424417-1.patch | 1.67 KB | Mac_Weber |
Comments
Comment #1
Mac_Weber CreditAttribution: Mac_Weber commentedComment #2
Mac_Weber CreditAttribution: Mac_Weber commented