Reputation: 20
I am currently facing an issue with indexing nested documents in Solr 8.11. According to the documentation, the IDs of child documents should be automatically generated by concatenating the ID of the parent with a separator and unique path information. However, this behavior is not working as expected.
I have defined the schema as per the documentation to index nested documents, but when I index the data, Solr is not treating it as nested documents. For reference, I am providing the schema and data I used, along with the indexed data in Solr:
Schema I used,
<field name="Address" type="string" multiValued="false" indexed="true" stored="true"/>
<field name="Coordinates" type="string" multiValued="false" indexed="true" stored="true"/>
<field name="FacilityName" type="text_general" multiValued="false" indexed="true" stored="true"/>
<field name="Location" type="text_general"/>
<field name="StudyId" type="string" multiValued="false" indexed="true" stored="true"/>
<field name="TrialHeading" type="text_general" multiValued="false" indexed="true" stored="true"/>
<field name="_nest_path_" type="_nest_path_"/>
<field name="_root_" type="string" indexed="true" stored="false" docValues="false"/>
Data I used to do the PoC:
{
"id": "00183",
"NCTId": "0024",
"TrialHeading": "A Phase III, Randomized, Double-Blind, Placebo-Controlled Study to Evaluate the Efficacy and Safety of Drug Z in Patients with Condition A",
"StudyId": "DRUGZ-456",
"Location": [
{
"Address": "Paris, France",
"Coordinates": "48.8566 2.3522",
"FacilityName": "Hôpital de la Pitié-Salpêtrière",
"LocationStatus": "Active, Not Recruiting",
"LocationContact": "[email protected]"
},
{
"Address": "Berlin, Germany",
"Coordinates": "52.5200 13.4050",
"FacilityName": "Charité - Universitätsmedizin Berlin",
"LocationStatus": "Completed",
"LocationContact": "[email protected]"
}
]
}
The data indexed in Solr:
{
"id": "00183",
"NCTId": "0024",
"TrialHeading": "A Phase III, Randomized, Double-Blind, Placebo-Controlled Study to Evaluate the Efficacy and Safety of Drug Z in Patients with Condition A",
"StudyId": "DRUGZ-456",
"Location": [
"{Address=Paris, France, FacilityName=Hôpital de la Pitié-Salpêtrière, Coordinates=48.8566 2.3522}",
"{Address=Berlin, Germany, FacilityName=Charité - Universitätsmedizin Berlin, Coordinates=52.5200 13.4050}"
],
"_version_": 1818843546417889280
}
I would appreciate any guidance or suggestions on how to resolve this issue.
Upvotes: 0
Views: 31