我有一个用例,其中有一个父文档和一些父文档的子文档。当我搜索时,我想始终返回父文档。让我们说,如果搜索结果命中 2 个具有相同父级的子文档,则需要将结果分组到一个搜索结果中,并从子文档中继承片段。我也想应用分页,但分页应该在转换后的搜索结果上。这可能吗?父子关系是<parent-document-location>
子文档的属性
父文档属性
<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
<id xmlns="http://ir.abbivenet.com/content-repo/metadata">1e900d1a7210350c0b68973fb0d6dc96f83e161a</id>
<cpf:processing-status xmlns:cpf="http://marklogic.com/cpf">done</cpf:processing-status>
<cpf:property-hash xmlns:cpf="http://marklogic.com/cpf">34d0a49cf8835387f6bd213a31732ad4</cpf:property-hash>
<cpf:last-updated xmlns:cpf="http://marklogic.com/cpf">2016-03-15T21:18:20.521372Z</cpf:last-updated>
<cpf:state xmlns:cpf="http://marklogic.com/cpf">http://marklogic.com/states/done</cpf:state>
<cpf:self xmlns:cpf="http://marklogic.com/cpf">/documents/BioEln/1e900d1a7210350c0b68973fb0d6dc96f83e161a.xml</cpf:self>
<prop:last-modified>2016-03-15T21:50:38Z</prop:last-modified>
</prop:properties>
子文件 1
<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
<document-parent-location xmlns="http://ir.abbivenet.com/content-repo/metadata">/documents/BioEln/1e900d1a7210350c0b68973fb0d6dc96f83e161a.xml</document-parent-location>
<context xmlns="http://ir.abbivenet.com/content-repo/metadata">BioEln</context>
<id xmlns="http://ir.abbivenet.com/content-repo/metadata">1e900d1a7210350c0b68973fb0d6dc96f83e161a</id>
<prop:last-modified>2016-03-15T21:50:34Z</prop:last-modified>
</prop:properties>
子文档 2
<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
<document-parent-location xmlns="http://ir.abbivenet.com/content-repo/metadata">/documents/BioEln/1e900d1a7210350c0b68973fb0d6dc96f83e161a.xml</document-parent-location>
<context xmlns="http://ir.abbivenet.com/content-repo/metadata">BioEln</context>
<id xmlns="http://ir.abbivenet.com/content-repo/metadata">1e900d1a7210350c0b68973fb0d6dc96f83e161a</id>
<prop:last-modified>2016-03-15T21:50:34Z</prop:last-modified>
</prop:properties>