Hi Mike,

Can you expand on this idea at all? What kind of field? Any pointers as to
where in the database config I might set up such a field?

Also, does anyone know how it is that search:search is able to search all
text nodes by default, but I can't configure a cts:search to do that? Seems
odd, if true.

Regards,

Stuart


On Fri, Jun 29, 2012 at 3:25 PM, Michael Blakeley <m...@blakeley.com> wrote:

> Might be a good job for a field, in the database config.
>
> -- Mike
>
> On Jun 29, 2012, at 8:48, Stuart Myles <stuart.my...@gmail.com> wrote:
>
> 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
>
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to