In solr 6.6.0, I want to use nested objects for particular key.
So suppose, I have one document as follows :
{
"ID": "16_nl",
"countryIso": "AUS",
"regionId": 30,
"name": "test",
"placeId": 50,
"eventID": 100,
"facilities": [12],
"created": "2017-11-30T11:00:36.717Z",
"modified": "2017-11-30T11:00:36.717Z"
}
But now, I want to add child document inside above document with key "proposal" as follows
{
"ID": "16_nl",
"countryIso": "AUS",
"regionId": 30,
"name": "test",
"placeId": 50,
"eventID": 100,
"facilities": [12],
"proposal": [{
"duration": 55,
"price" : 300,
"status":"VISIBLE"
}],
"created": "2017-11-30T11:00:36.717Z",
"modified": "2017-11-30T11:00:36.717Z"
}
How can I do that in Solr?
I have gone through http://yonik.com/solr-nested-objects/ and other documentations and I have below concerns
- I didn't get how should we map child document to "proposal" key?
- I think, fields such as "ID", "countryIso", "regionId" are defined as required in parent document, so is it necessary to use those fields in child documents also?