Hi,

I'm still coming up to speed on XQuery and MarkLogic and I can't quite
figure out something that I'm sure will be obvious once I hear the
answer.

The signature on cts:search() is

cts:search(
$expression as node()*,
$query as cts:query?,
[$options as xs:string*],
[$quality-weight as xs:double]
)  as  node()*

Does "$expression as node()*" mean that I should be able to pass in
more than one path so I can search more than one node?  I initially
assumed so, but I can't figure out how to do it after trying several
different ways.  After looking at the Shakespeare sample app I was
able to build the query below, which works but seems a little awkward.
Is there an easier way?

let $ORIGINAL_QUERY := "test phrase"
for $i in cts:search( //element()[self::chapter[not(descendant::entry)] |
                               self::div[not(descendant::entry)] |
                               self::entry |
                               self::section],
                   cts:word-query(
                                   $ORIGINAL_QUERY,
                                   ("case-insensitive","diacritic-insensitive")
                                 )
                 )
return
(: handle results sequence :)

Thanks,
Mattio
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to