I have the following expression:
let $q1 := cts:element-range-query(xs:QName("ts:week"), ">=" ,xs:date("2009-04-25"))
return cts:search(fn:doc(), $q1, "unfiltered")
I did a xdmp:plan
, and got to know that range indexes are being used and the expression is searchable
However, when I added a XPath:
let $q1 := cts:element-range-query(xs:QName("ts:week"), ">=" ,xs:date("2009-04-25"))
return cts:search(fn:doc(), $q1, "unfiltered")/ts:top-song/ts:title/text()
On doing a xdmp:plan
, it told me the path is unsearchable. Further on doing in query-trace it said other than fn:doc()
nothing searchable.
However, since I am getting the correct result. My guess is that indexes are working just fine.
If so, what is logging the message "unsearchable" ?
I specifically need the title element in this case, is there anything I can do to make the entire expression searchable ?