Hello All,

I've been trying to resolve the frequency count (retrieved through a
function like cts:element-values) into actual search results in 3.2, but the
number of results does not match the frequency count. The example below
shows the query I've been trying out in CQ.

let $elem := cts:element-values(xs:QName("kwd"), "",
("frequency-order","fragment-frequency"), cts:element-query(xs:QName("kwd"),
"water"))[1]
let $freq := cts:frequency($elem)
let $cnt := xdmp:estimate(cts:search(doc(),
cts:element-query(xs:QName("kwd"), $elem)))
return concat ($elem, " (freq: ", $freq, ") (search: ", $cnt, ")")

Please note that I use cts:element-query in both lexicon and search queries.
The only difference is that the search parameter in the second query is
changed to the first item of the results from the lexicon.

-Bilal
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to