Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

cts:highlight not working as expected #711

Open
lakshmananTechM opened this issue Sep 8, 2017 · 3 comments
Open

cts:highlight not working as expected #711

lakshmananTechM opened this issue Sep 8, 2017 · 3 comments

Comments

@lakshmananTechM
Copy link

lakshmananTechM commented Sep 8, 2017

below code not working as expected...
cts_entity_highlight

I Run the below code in QueryConsole

xquery version "1.0-ml"; 
let $myxml := <node>Queen Elizabeth celebrated her Diamond Jubilee in London this June. A thanksgiving service at St Paul's Cathedral where the ArchBishop of Canterbury paid tribute to her "lifelong dedication". One thousand boats took part in the Diamond Jubilee Thames River Pageant, the first of its kind for 350 years! </node> 
return cts:entity-highlight($myxml, element { fn:replace($cts:entity-type, ":", "-") }{ $cts:text })

i getting below result

<node>Queen Elizabeth celebrated her Diamond Jubilee in London this June. A thanksgiving service at St Paul's Cathedral where the ArchBishop of Canterbury paid tribute to her "lifelong dedication". One thousand boats took part in the Diamond Jubilee Thames River Pageant, the first of its kind for 350 years!
</node>

but expected result is different... i attached expected result...

@popzip
Copy link
Contributor

popzip commented Sep 12, 2017

THat code doesn't look familiar - is this related to Samplestack?

@popzip
Copy link
Contributor

popzip commented Sep 13, 2017

I did some investigation, it looks like cts:entity-highlight was removed in MarkLogic 8. What version of MarkLogic are you using? Where did you get the sample code?

@lakshmananTechM
Copy link
Author

Thanks for your reply. I found that it is old version 'cts:entity-highlight'. i took this same code from marklogic learning sample.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants