[MarkLogic Dev General] bug? cts:highlight and phrase-through

Mike Sokolov sokolov at ifactory.com
Thu Nov 2 07:27:56 PST 2006


I have been observing some idiosyncratic behavior (ie bug) 
w/cts:highlight.  I'd love it if someone could explain how it's not a 
bug so I can fix my code, but I just don't see it.  Here's what I have 
in my document:

<name><fname>Martin</fname><fname>Luther</fname><sname>King</sname></name>

All of the above tags ( are listed as phrase-throughs (and not 
element-word-query-throughs - I have none of these).

When I search for the phrase "martin luther king", the document 
containing the above markup is found: good.  But when I highlight the 
document (using <hit>{$cts:text}</hit> as the replacement), I get:

<name><fname><hit>Martin</hit></fname><fname>Luther</fname><sname><hit>King</hit></sname><ntitle>Jr.<ntitle><name>

Look carefully - why wasn't Luther highlighted?

This would be a minor cosmetic bug except that we are using the 
cts:highlight to do tag text with cross-reference elements, so it ends 
up being pretty important for us, just FYI.

-Mike Sokolov






More information about the General mailing list