Hi,

I am tying to achieve below document nested structure in solr using
ContentStreamUpdateRequest. Its represent a document and its metadata.

 {
    "id": "1235",
    "title": "test",
    "sourcemetadata": [{
        "id": "455"
    }, {
        "size": "455"
    }],
    "content": "this is the content"
}

But when I used ContentStreamUpdateRequest, I am not able to upload the
document to solr. Its throwing the error

missing required field: sourcemetadata.id

Below the java code which I used.

            ContentStreamUpdateRequest contentStreamUpdateRequest = new
ContentStreamUpdateRequest("/update/extract?fmap.content=content&commit=true");

           ModifiableSolrParams params = new ModifiableSolrParams();
           params.add("literal.id","5632");
           params.add("literal.sourcemetadata.id","567");
           params.add("literal.sourcemetadata.size",
String.valueOf(file.length()));
           contentStreamUpdateRequest.setParams(params);

Could you please help me how to write nested documents in solr using
ContentStreamUpdateRequest ?




-- 
Best Regards,


*Sreejith Variyath*
Lead Software Engineer
Tarams Software Technologies Pvt. Ltd.
Venus Buildings, 2nd Floor 1/2,3rd Main,
Kalyanamantapa Road Jakasandra, 1st Block Kormangala
Bangalore - 560034
Tarams <http://www.tarams.com/>

-- 
w: www.tarams.com <https://www.tarams.com/>

 
<https://www.linkedin.com/company/tarams-software/>   
<https://www.facebook.com/TaramsTech/>   <https://twitter.com/taramstech>

=============================
DISCLAIMER:
 The information in this message 
is confidential and may be legally 
privileged. It is intended solely for 
the addressee. Access to this 
message by anyone else is unauthorized. If 
you are not the intended 
recipient, any disclosure, copying, or 
distribution of the message, or 
any action or omission taken by you in 
reliance on it, is prohibited and
 may be unlawful. Please immediately 
contact the sender if you have 
received this message in error. Further, 
this e-mail may contain viruses
 and all reasonable precaution to minimize 
the risk arising there from 
is taken by Tarams. Tarams is not liable for 
any damage sustained by you
 as a result of any virus in this e-mail. All 
applicable virus checks 
should be carried out by you before opening this 
e-mail or any 
attachment thereto.
Thank you - Tarams Software Technologies 
Pvt.Ltd.
=============================

Reply via email to