[MarkLogic Dev General] How to prevent indexing
mike at blakeley.com
Thu Jun 28 09:10:16 PDT 2012
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:
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.
On Jun 28, 2012, at 8:32, Tim Finney <tjf at 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?
> Tim Finney
> General mailing list
> General at developer.marklogic.com
More information about the General