relatedToQuerySearchParameter.setQueries(new String[] {"mars cruise"});
selector.setSearchParameters(
new SearchParameter[] {relatedToQuerySearchParameter, languageParameter});
// Get related keywords.
TargetingIdeaPage page = targetingIdeaService.get(selector);
// Display related keywords.
if (page.getEntries() != null && page.getEntries().length > 0) {
for (TargetingIdea targetingIdea : page.getEntries()) {
Map<AttributeType, Attribute> data = MapUtils.toMap(targetingIdea.getData());
StringAttribute keyword = (StringAttribute) data.get(AttributeType.KEYWORD_TEXT);
IntegerSetAttribute categories =
(IntegerSetAttribute) data.get(AttributeType.CATEGORY_PRODUCTS_AND_SERVICES);
String categoriesString = "(none)";