-------------------------------------------------------------------------
Hello John,
I guess your second query isn't really doing what you intend it to do.
Actually, it will yield the same output as your first query (the child
step /MainDesc will only have the effect that fragments without MainDesc
as a child will be filtered out). I guess the following query should
work (at least if I understood correctly what you are trying to achieve):
for $x in ft:search("docMaster", ("emf","waves"), map{'mode':='all
words'})/parent::*:MainDesc/
parent::*:Doc
return $x/DocTitle/text()
Thereby, you using the parent step you assure that the found text node
was actually inside a MainDesc node.
Please also note that there is a difference between an ancestor step and
a parent step and as you seem to know your structure it might be easier
and faster to simply use parent.
Cheers,
Dirk
--
Have a nice day
JBest