Search code examples
ms-wordinsertdocumentmarklogic

How to insert a word document into MarkLogic?


We are trying to insert a word document into MarkLogic , but we are not sure how to do it, we have searched many sites but we have not got any feasible answers.


Solution

  • It doesn't really matter what kind of document is being loaded: all the load APIs work the same. So you could use xdmp:load e.g. xdmp:load("/home/whoever/foo.docx","/dbpath/foo.docx")

    Since this is a binary file, it won't be particularly searchable. If you want to make it searchable, there is a CPF pipeline that unzips the docx and cleans it up a bit. See CPF documentation