This is a nice point, Mike, and something I've struggled with. With V6 and it's ability to index documents that hve missing values for specific range indexes, I think there might be some way to write an efficient query that would tell you which documents are missing a value, w/out having to materialize them. (I recall Gajanaan walking me through such a query at some point).
That said, I wish it was easy to get those details back as part of the element values/frequency APIs though. Perhaps an RFE... Eric Eric Bloch Director, Community MarkLogic Corporation desk +1 650 655 2390 | mobile +1 650 339 0376 email [email protected]<mailto:[email protected]> web developer.marklogic.com<http://developer.marklogic.com> twitter @eedeebee On Sep 22, 2013, at 11:10 PM, Michael Blakeley <[email protected]<mailto:[email protected]>> wrote: Usually it's best to materialize nulls. That way they can be indexed. -- Mike On 22 Sep 2013, at 21:43 , Gontla Praveen <[email protected]<mailto:[email protected]>> wrote: Hi All, Can someone suggest me why cts:element-values will count null values also. Below is the same scenario which i came across of. declare namespace pr="http://www.w3schools.com"; let $query := cts:directory-query("/onlinedocs/") let $vals := cts:element-values(xs:QName("pr:filtervalue"),(),("collation=http://sample.com")$query) return for $i in $vals return <filter value="{$i}">{cts:frequency($i)}</filter> The above value returns me all distinct values that are available in my DB under the element pr:filtervalue including null value. Below is the sample $vals response: <filter value="online">40</filter> <filter value="online_new">90</filter> <filter value="offline">50</filter> <filter value="offline_new">20</filter> <filter value="">40</filter> Thanks in Advance Thanks, Praveen _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ 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
