Query based on high level container meta

Team,

We would like to query objects, such as topics, and find all topics that are contained by a publication that match metadata criteria.

Example: Publication has meta associated with 'Widget 2.0'.   We would like to query and find all topics contained within a publication that contains 'Widget 2.0' meta. 

Topic X
Topic Y
Topic Z

Pub A [@product=Widget 2.0] Topic X, Topic Z
Pub B [@product = Widget 1.0] Topic Y, Topic Z

If we perform a query we want to find all topics associated with Widget 2.0 at the Pub level.

Is this possible ?

Thanks.

  • Hi David,
     
    We don't have that hierarchical information available in one go using metadata or even Full-Text-Index search... Using the CMS metadata you can achieve what you are looking for by
     
    1. First find the Publication(Outputs) that match your metadata filter criteria (PublicationOutput25.Find)
    2. Then for every found Publication retrieve the used content objects.
      1. Note, you can do this quite simple/quick by retrieving the baseline of the publication. Retrieve the entries of the baseline by calling Baseline25.GetBaseline and providing the publication field FISHBASELINE as psBaselineId parameter value. The returned values are topic/map LogicalID (typically GUIDs) and versions. If desired you can get more information like FTITLE from those LogicalIDs by a DocumentObj25.RetrieveMetadata call.
      2. Or if you want to go more accurate (e.g. when you use shared baselines) then you need to run a report on those found publications using the root DITA Map and library DITA Topics as starting point (Baseline25.ExpandBaseline)

    This is achievable over the CMS Web Services API. The simple scenario is possible using ISHRemote and PowerShell. Not sure what particularly you are looking for.

  • Specifically we would like to enable this functionality in query folders.

    Query folder that shows "all components" contained by publications of type "product." This would then show all components associated with that product.

    As is.. it appears that we're required to add these metadata fields to all components which adds redundancy in the implementation and increases complexity (adding fields often requires a design/development cycle).
  • The hierarchical metadata is not there for query folders (who allow grouping using logical-level fields) as you mention. So you have to denormalize the publication metadata on the referenced/used content objects (topics, images, maps, etc).