0

I have the following data model. A Page type with a repeating group names files. Inside the repeating group, there is a node-selector to select files name file

Then I need to index the metadata of the page with the metadata of the file in order to do a search by files.

To accomplish this I'm using org.craftercms.cstudio.publishing.processor.SearchAttachmentWithExternalMetadataPostProcessor

The first document I attached works fine but any other File is not being indexed with the metadata of the page.

This is the Reference list I'm using

<property name="referenceXpathList">
   <list>
      <value>//file/item/value</value>
   </list>
</property>

Even though my XPath expression should match all file.item.value I'm just getting the first match.

Paras
  • 804
  • 1
  • 10
  • 25
CL1MB3R
  • 145
  • 9

1 Answers1

0

SearchAttachmentWithExternalMetadataPostProcessor expects each XML document to just have one associated binary file. In most cases it makes sense because the XML document contains metadata that's just specific to that file. So if the XPath returns a list it will select the first one. You can always extend the processor and make it so that the same XML metadata is associated to different files.

Alfonso Vasquez
  • 598
  • 3
  • 10