On trying to add this nested document,
Only parent document is getting indexed(without labelinfo field) and child documents are being ingored.
On checking the code,
I realized that since labelinfo is a Map, Solr is trying for atomic updates and since label_image, hotdeal_type, apply_hotdeal are invalid operation field is ignored. Unfortunately, child documents are also not getting indexed.
- field is silently ignored when its value is a map instead of failing document update(when present in parent)
- In the above case, child document is also getting ignored
- If any field value is Map in child document but not in parent then nested document is indexed properly
Here, nested document is indexed and labelinfo field value indexed in book6_c1 as string(using Map.toString())
- If an unknown operation is specified in update document then instead of ignoring the field and field value, fail the document update(fail fast approach). So, that user would know something is wrong with the document. Also, this would solve the case where the parent doc is getting indexed and child documents are getting ignored
- Currently, when child document's field value is a Map even then it gets indexed, instead update should fail