[英]Marklogic - highlighting cts:element-attribute-range-query output
i am doing a cts:element-attribute-range-query
and the results from it is working fine. 我正在做一个
cts:element-attribute-range-query
,其结果运行良好。 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 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. 我可以看到
cts:element-attribute-*-query
输出将不适合cts:highlight
函数。 I am using Marklogic 4.2. 我正在使用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:element-attribute-range query
的结果输出?
You could try cts:walk
instead of cts:highlight
. 您可以尝试使用
cts:walk
而不是cts:highlight
。 During the walk, look for nodes where cts:contains
returns true for the attribute portion of your query. 在遍历期间,查找查询的属性部分
cts:contains
返回true的节点。 Then you can highlight those nodes using whatever mechanism you like. 然后,您可以使用任何喜欢的机制突出显示那些节点。
http://developer.marklogic.com/pubs/4.2/apidocs/SearchBuiltins.html#cts:walk has examples. http://developer.marklogic.com/pubs/4.2/apidocs/SearchBuiltins.html#cts:walk有示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.