以下是 XML 结构 - (我给出了整个文档的一小部分数据有限。我有一个 6 GB 的 XML DB,具有适当的全文索引。)
<Docs>
<Doc>
<Chap>No - 1</Chap>
<Desc>
<Notes>
<Para t="sn">departmental report</Para>
</Notes>
<Notes>
<Para t="sn">The equiry commission is good.</Para>
</Notes>
<Notes>
<Para t="sn">departmental process</Para>
<Para t="ln">The enquiry report for the bomb blast is yet to come.<bL/>
<bL/>The department working on this is quite lazy.</Para>
</Notes>
</Desc>
</Doc>
<Doc>
<Chap>No - 2</Chap>
<Desc>
<Notes>
<Para t="sn">Enquiry Processes Report</Para>
<Para t="ln">The enquiry process is very simple.<bL/>
<bL/>With proper guidance anybody can handle the commission easily.<bL/>
<bL/>
</Para>
</Notes>
<Notes>
<Para t="sn">Enquiry - Departmental</Para>
</Notes>
</Desc>
</Doc>
<Doc>
<Chap>No - 3</Chap>
<Desc>
<Notes>
<Para t="sn">Physics Department</Para>
</Notes>
<Notes>
<Para t="sn">Working process of physics department is quite lengthy</Para>
<Para t="ln">Even after proper enquiry, I was told nothing.<bL/>
<bL/>This was like a bomb blast.</Para>
</Notes>
<Notes>
<Para t="sn">Departmental enquiry.</Para>
<Para t="ln">There should be a departmental enquiry for this wrong process.</Para>
</Notes>
</Desc>
</Doc>
</Docs>
现在我想要所有那些Chap
包含所有单词“部门”、“查询”和“报告”的节点。
到目前为止,我无法使用各种组合来获得它们。我的尝试之一是 -
for $x in ft:search("Docs", ("departmental enquiry report"), map{'mode':='all words'})/ancestor::*:Para
return $x/ancestor::Chap
任何人都可以指导我吗?