AnsweredAssumed Answered

Append attachment content to parent xml file

Question asked by kkancherla Employee on Jun 21, 2017
Latest reply on Jun 30, 2017 by kkancherla



We have xml files in a directory on a HCP namespace called "messages" that contain chat conversations. Sometimes these chat messages include attachments. These attachments are stored in a different directory called "attachments"(same directory level as "messages") on the same namespace .



rest/dir1/dir2/dir3/messages/IM_2306.xml - custom metadata has a relative reference to attachment(most of them, but not all)

rest/dir1/dir2/dir3/attachments/1.doc   - custom metadata has a relative reference to the parent.


Today when we index these objects using HCI their content is indexed seperately.


Now we want to add the attachment content to its parent xml message content in the pipeline on the same document.


messages/IM_2306.xml has a HCI_content stream

attachments/1.doc has its own HCI_content stream


We want to add the attachment content to its parent, so it would look something like this:






Any ideas on how this can be done with the built in or custom plugins.


Some ideas that came up during discusion:


1) custom stage to get the content of the attachment and add it as a stream using the attachment reference in the parent custom metadata

2) custom stage with a recursive feature that sends the attachment to the beginning of the pipeline(similar to email expansion, zip and other expansion stages)