问题描述
我正在执行cts:element-attribute-range-query
,其结果工作正常.但是突出显示对输出结果无效.当我提到搜索指南
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
我可以看到cts:element-attribute-*-query
输出将不适用于cts:highlight
功能.我正在使用Marklogic 4.2.我的应用程序很大程度上取决于此突出显示的输出,我有什么办法可以突出显示cts:element-attribute-range query
的结果输出?
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
?
推荐答案
您可以尝试使用cts:walk
代替cts:highlight
.在遍历过程中,查找查询的属性部分cts:contains
返回true的节点.然后,您可以使用任何喜欢的机制突出显示那些节点.
You could try cts:walk
instead of cts:highlight
. During the walk, look for nodes where cts:contains
returns true for the attribute portion of your query. Then you can highlight those nodes using whatever mechanism you like.
http://developer.marklogic.com/pubs/4.2/apidocs/SearchBuiltins.html#cts:walk 包含示例.
这篇关于Marklogic-突出显示cts:element-attribute-range-query输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!