Another idea would be to save the doc in the db with a different file extension so ML would automatically treat it as a binary. Or just change the mimetype for HTML in ML to be binary.
Sent from my iPhone On Jun 28, 2012, at 10:10 AM, "Michael Blakeley" <m...@blakeley.com> wrote: > You could keep the documents as XML but exclude their root element from > word-query indexing. There would still be XPath indexing but I estimate this > would be 25-50% of the ordinary indexing done. > > Or yes, you could store them as binary. From XCC or xdmp:document-load that > is as simple as setting the format. From XQuery with constructed XML it might > be a little harder. But try this: > > binary { > xs:hexBinary( > xs:base64-binary( > xdmp:base64-encode( > xdmp:quote($xml))) } > > That looks ugly, but seems to be reasonably efficient. I think the UTF8 bytes > will end up in the database, so there should be no need for output > conversion. Remember to set the right content-type, though. > > -- Mike > > On Jun 28, 2012, at 8:32, Tim Finney <t...@tfinney.net> wrote: > >> Hi All, >> >> I'd like to know how to minimize the overhead associated with reading >> and writing an HTML document to a MarkLogic database. I want to create a >> cache of previously generated HTML pages to improve response times. Is >> there a way to, say, make the server think an HTML page is a binary and >> therefore not do any indexing? Or is there another strategy that would >> give me good read and write performance and avoid loading the server >> with indexing that will never be used? >> >> Best, >> >> Tim Finney >> >> >> _______________________________________________ >> General mailing list >> General@developer.marklogic.com >> http://community.marklogic.com/mailman/listinfo/general >> > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://community.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com http://community.marklogic.com/mailman/listinfo/general