I need to retrieve components that have linked a keyword which an specific metadata value. As an entry we have the schema type, the field name and the keyword metadata value.

Is this possible with SDL Web 8.5 in a Java implementation? Is there any broker query that enables that with a good performance?

As an example. I want to retrieve Shop components that have the code IDSHOP: SEV-100 as metadata of the keyword.

Component Shop XYZ

  • ShopName: Shop XYZ

Category ShopName

  • Keyword Shop XYZ

  • Key ID100

  • KeywordMetadata IDSHOP: SEV-100

1 Answer 1


As far as I know there is no way to look for keywords with a certain metadata field in the broker. What you normally do, is search for components (sometimes pages) by passing in the ID or title of a keyword.

However, there may be a work-around. You can use the TaxonomyFactory to retrieve all keywords in a category, including their metadata fields. You can do this once, when the application starts, and then store the keywords in a hash table using this particular metadata field as the key. To find all Shop components which are tagged with a keyword which has this a given value in its IDSHOP metadata field, you would need to do the following:

  • Find all the matching keywords in your hash table
  • Add a KeywordCriteria or CategorizationCriteria for each keyword
  • Combine all these criteria into an 'OrCriteria'
  • Execute the query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.