While querying fredhopper to get the resultset, I have seen that there is 2 methods available to get the list of items from query resultset, getItems() and getPromotions(). Can anyone explain what is the List received as a part of execution result of getItems() method. When I used item.getRegion() method it always return null. Thanks in advance..
Promotions are the SmartTarget promotions that match your query. They apply for certain regions (getRegion, singular, is deprecated at least in SmartTarget 2014 SP1).
The docs explain result set...
Represents the result of a query to Fredhopper.
Includes Promotions, Items (search results) and a Navigational structure based on Fredhopper's facets. Example:
QueryBuilder queryBuilder = new QueryBuilder(publicationId, regionList); ResultSet resultSet = queryBuilder.execute(); int totalItemCount = resultSet.getItemsTotalCount(); List<Promotion> promotions = resultSet.getPromotions(); List<Item> items = resultSet.getItems(); Navigation navigation = resultSet.getNavigation();
Items from a result set are search results, which seem to be the same type of object, but separate from the items inside the Promotions.
If placing SmartTarget Promotions, I think you'd use
supportsRegion(String regionName) to place them, but I'll let the devs confirm the right approach.