[MarkLogic Dev General] RE: General Digest, Vol 64, Issue 27
neil at bradley.co.uk
Fri Oct 9 08:06:59 PDT 2009
Though I would still like some feedback if possible on my original question
about the effects on memory of using different approaches to the basic
fn:replace() function, if anyone knows about MarkLogic's garbage collection
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Kelly Stirman
Sent: 09 October 2009 11:21
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] RE: General Digest, Vol 64, Issue 27
It will work with text, but you have to do a little more work.
cts:highlight() wants an element or document node, so you can wrap your text
in an element constructor as you pass it in, then go back to text on the way
let $doc :=
"I have some text that includes the words Doc, ume, and nt."
. . . .
I'm not sure about the rest of your question, but since you don't want to
expand on it, I won't ask you to. :) As Geert suggests, CPF will let you
work through a series of steps asynchronously, manage state transitions,
etc, if that is an approach you'd like to consider. I hope I didn't confuse
the subject by suggesting you store the queries as documents to manage your
string replacing more efficiently. The idea is otherwise the same -
documents are "enriched" one at a time by replacing multiple string values
with a new value.
Date: Fri, 9 Oct 2009 15:37:39 +0100
From: "Neil Bradley" <neil at bradley.co.uk>
Subject: RE: [MarkLogic Dev General] RE: Text Updates Garbage
Collection? (Neil Bradley)
To: "'General Mark Logic Developer Discussion'"
<general at developer.marklogic.com>
Content-Type: text/plain; charset="us-ascii"
Does that approach work with text documents?
Another issue is that, for reasons I do not want to expand on here, we want
to process one document at a time through the step discussed here along with
other prior and following steps, so I am not sure the benefits of this
approach over the fn:replace() function. But it is certainly a interesting
General mailing list
General at developer.marklogic.com
More information about the General