By default, terms entered into search:search() simply search all text nodes
of a document, as explained in:

http://community.marklogic.com/try/ninja/page13

What I'd like to do is to query certain attributes and all the text nodes
in my document. But, ideally, I don't want to list all of the text nodes,
since there are so many of them (and we might add more).

To make my question more concrete, here's the cts:or-query from the above
"Extending the Search API" "ninja" article:

 <cts:or-query qtextconst="{ $token }">
    { cts:element-attribute-word-query(xs:QName("message"),
         xs:QName("list"), string($token), $options, 2.5) }
    { cts:element-attribute-word-query(xs:QName("attachment"),
         xs:QName("file"), string($token), $options, 3) }
    { cts:element-attribute-word-query(xs:QName("from"),
         xs:QName("personal"), string($token), $options, 3) }
    { cts:element-attribute-word-query(xs:QName("from"),
         xs:QName("address"), string($token), $options, 3) }
    { cts:element-word-query(xs:QName("subject"), string($token),
         $options, 2) }
    { cts:element-word-query(xs:QName("para"), string($token),
         $options, 1) }
    { cts:element-word-query(xs:QName("attachpara"), string($token),
         $options, 0.75) }
    { cts:element-word-query(xs:QName("quotepara"), string($token),
         $options, 0.5) }
  </cts:or-query>

What if, rather than listing each of the QNames for subject, para,
attachpara and quotepara I wanted to just say "query all text nodes" (and
given them all the same score weight, of course)? Is it doable?

Thanks in advance,

Stuart
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to