Currently you can use SearchTemplatingFunctions (searchfn) to search the DAM. The problem is that binary data itself gets stored on a resource sub node. So if I have a PDF and I search mgnl:asset nodes then I cannot find terms that may be located in the binary data itself. That will only search the metadata of the asset node. On the other hand, if I search mgnl:resource nodes then I will not find terms located in the asset metadata.
Two solutions to the problem could be:
- We add a searchAssets() function to the DamTemplatingFunctions (damfn) that considers both levels of data and wraps everything into a single call.
- We add another aggregation entry to the indexing_configuration.xml
In the second method we can then use the SearchTemplatingFunctions since all the data will be aggregated into a single document. The preferred way from an efficiency standpoint.
As a result of the fix, asset search in Assets app works now properly.