Hi,
I am trying to search some content and highlight the search strings present in
the content(like google) in MarkLogic using REST API. The problem is when I am
including "ME" in the search-string, it's highlighting the <i> (html italic
tags) along with the "Me" in the content. I have created a field with some
elements and running a word-query on the field.
For example:
<resources>
<title> some data from me</title>
<desc> more data <i> from </i> somewhere by me </desc>
</resources>
I have created a field called 'suggestions' with elements 'title' and 'desc'
and searching the search strings within the field using word-query.
Now when i search for "some me" ,its retrieving the content like
<resources>
<title> <<span class="highlight">some</span> data from <<span
class="highlight">me</span></title>
<desc> more data <<span class="highlight">i</span>> from <<span
class="highlight">i</span>> somewhere by <<span class="highlight">me</span>
</desc>
</resources>
Url:
localhost:9000/v1/search?q=some
me&collection=Data&start=0&pageLength=10&options=Transformation&format=json
I am using cts:highlight for highlighting, something like :
cts:highlight($final-result, $query, fn:concat('<span
class="highlight">',$cts:text,'</span>')), $custom-config)
Trying to understand if there is any grammar for which 'Me' and 'I' are treated
as same? Or there is some problem with HTML tag parsing.
Looking forward for a prompt reply.
Thanks in Advance.
Regards,
Tanaya Mondal
Programmer Analyst
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient(s), please reply to the sender and
destroy all copies of the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email,
and/or any action taken in reliance on the contents of this e-mail is strictly
prohibited and may be unlawful. Where permitted by applicable law, this e-mail
and other e-mail communications sent to and from Cognizant e-mail addresses may
be monitored.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general