I don't believe that will work. Instead, you might want to try the following approach:
cts:search(/(a | b), cts:and-query(())) Darin. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Sokolov Sent: Wednesday, April 18, 2007 9:24 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] cts:search question Mattio - The signature seems to imply you should be able to pass a sequence of nodes using multiple paths by wrapping them in parens: cts:search ((path1, path2, path3), ...) you could also do multiple searches Mattio Valentino wrote: > 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 _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
