[MarkLogic Dev General] effectively constraining a cts:search

Anderson, Dr. Clifford clifford.anderson at ptsem.edu
Fri Nov 6 06:29:50 PST 2009


I wonder if someone could suggest the most efficient way to query a set
of documents where a desired constraint exists outside the element being
queried.

 

For example, take:

 

<book>
    <title>Sample</title>
    <year>1959</year>
    <content>
        <p>some content</p>
        <p>more content</p>
    </content>
</book> 

 

How would I write an effective cts:search for "p" elements containing
the word "more," with a constraint on book documents with a "year"
element value of 1959? My goal is to bring back only p elements, not
whole book documents. I've tried to accomplish this in several ways, but
none seem very efficient. Can someone point me in the right direction?

 

Thanks!


Cliff 

 

Clifford Anderson

Curator of Special Collections

Princeton Theological Seminary Libraries

609-497-3642 (phone)

609-497-1826 (fax)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20091106/e016a473/attachment.html


More information about the General mailing list