Hi Ambika, Jason's advice is good. Also, you can get even more detailed help, including an example of how to do it (transform results before passing to cts:highlight), if you post a detailed example of the problem you're trying to solve here: http://stackoverflow.com/questions/ask Be sure to tag the post with "marklogic".
Evan Lenz Software Developer, Community MarkLogic Corporation developer.marklogic.com<http://developer.marklogic.com> From: Jason Hunter <[email protected]<mailto:[email protected]>> Reply-To: General MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Wed, 14 Dec 2011 07:36:12 -0800 To: General MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] Reg: highlighting cts:element-attribute-range-query output 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]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
