When you highlight text you need to do something like add new element tags 
around the highlighted words in order to highlight them.  But you can't have 
element tags within attributes under the XML data model.  It just can't be 
represented.

If you want to highlight something, you need to transform the output first so 
that the text is in an element (where highlighting can be represented), then 
make sure your query matches a hit in either an attribute or an element, then 
highlight the modified representation.

If that sounds complex, you could also just pre-adjust your data as it's 
stored, so all your searchable text is in elements and then you don't query 
against attributes.

-jh-

On Dec 14, 2011, at 6:12 AM, ambika arumugam wrote:

> Hi all,
> 
> i am doing a cts:element-attribute-range-query and the results from it is 
> working fine. But highlighting is not working for the output result.
> When i referred the search guide 
> 
> http://developer.marklogic.com/pubs/4.2/books/search-dev-guide.pdf 
> 
> i could see that cts:element-attribute-*-query outputs will not be suitable 
> for cts:highlight function.
> I am using Marklogic 4.2. My application greatly depends on this highlighted 
> output, Is there any way i can highlight the result output of 
> cts:element-attribute-range query?
> 
> Thanks in advance,
> Ambika 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to