Thanks Shabana. That was very helpful.
On Thu, May 10, 2018 at 2:48 PM, shabana khan <shabana.0...@gmail.com> wrote: > Hi Bharath, > > You can add document and collection in single step itself. If you look at > the syntax of xdmp.documentInsert(), you will seen that you can pass > collection in options node itself : > > declareUpdate(); > xdmp.documentInsert( > 'document URI', > document, > { collections : 'name of collection'}) > > > Thanks and Regards, > Shabana Khan > LinkedIn <https://in.linkedin.com/pub/shabana-khan/40/229/454> > > > > > On Thu, May 10, 2018 at 12:47 PM, Bharath Umesh <bharat...@gmail.com> > wrote: > >> Thanks, Christopher. >> >> I was able to add document and add this document to its collection in 2 >> steps. >> >> declareUpdate(); >> xdmp.documentInsert('<Document URI', >> {..........} >> ); >> xdmp:document-add-collections("<document URI>", "<Collection Name>"); >> >> Is this correct? >> >> Thanks, >> Bharath >> >> >> >> >> On Wed, May 9, 2018 at 6:08 PM, Christopher Hamlin <cbham...@gmail.com> >> wrote: >> >>> The second and third examples at >>> https://docs.marklogic.com/xdmp:document-insert shows collections >>> being set. >>> >>> Do those work for you? >>> >>> On Wed, May 9, 2018 at 7:48 AM, Bharath Umesh <bharat...@gmail.com> >>> wrote: >>> > Hi >>> > >>> > How do I specify Collection info along with the document URI when >>> inserting >>> > a marklogic document. >>> > >>> > >>> > Thanks, >>> > Bharath >>> > >>> > _______________________________________________ >>> > General mailing list >>> > General@developer.marklogic.com >>> > Manage your subscription at: >>> > http://developer.marklogic.com/mailman/listinfo/general >>> > >>> _______________________________________________ >>> General mailing list >>> General@developer.marklogic.com >>> Manage your subscription at: >>> http://developer.marklogic.com/mailman/listinfo/general >>> >> >> >> _______________________________________________ >> General mailing list >> General@developer.marklogic.com >> Manage your subscription at: >> http://developer.marklogic.com/mailman/listinfo/general >> >> > > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general