Hi Team,
Below is my XML Structure -
<Docs> <Doc> <DocTitle C="1"></DocTitle> <MainDesc></MainDesc> <FullDesc></FullDesc> </Doc> <Doc> <DocTitle C="2"></DocTitle> <MainDesc></MainDesc> <FullDesc></FullDesc> </Doc> ............ ............
</Docs>
I have to search the Full Text DB of above documents with 3 different options -
1. Complete Document
2. Only in MainDesc (Main Description)
3. Only in FullDesc (Full Description)
Below is the query, using ft:search, for the first options, mentioned above
for $x in ft:search("docMaster", ("emf","waves"), map{'mode':='all words'})/ancestor::*:Doc return $x/DocTitle/text()
Now, this is for the 2nd options, i.e; for MainDesc -
for $x in ft:search("docMaster", ("emf","waves"), map{'mode':='all words'})/ancestor::*:Doc/MainDesc return $x/DocTitle/text()
Is it right ? I am little bit confused..